diff options
author | Jan Niklas Hasse <jhasse@bixense.com> | 2022-08-22 21:33:59 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-22 21:33:59 (GMT) |
commit | 864f7b5a2f49c764bf3b79bbb3ddd4b989403610 (patch) | |
tree | 02ffd3c7c7318c4ec937847e8c1fb5d8638b33aa | |
parent | e17d5946b8c111286e6db5f480b6e2c4df135099 (diff) | |
parent | 8e0af0809cd8e5403ad0410e6fd75c94934ca75d (diff) | |
download | Ninja-864f7b5a2f49c764bf3b79bbb3ddd4b989403610.zip Ninja-864f7b5a2f49c764bf3b79bbb3ddd4b989403610.tar.gz Ninja-864f7b5a2f49c764bf3b79bbb3ddd4b989403610.tar.bz2 |
Merge pull request #2139 from ken-matsui/support-building-libninja-re2c-on-configure-py
Support building `libninja-re2c.a` on `configure.py`
-rwxr-xr-x | configure.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/configure.py b/configure.py index 99a2c86..28ff855 100755 --- a/configure.py +++ b/configure.py @@ -493,16 +493,27 @@ else: "changes to src/*.in.cc will not affect your build.") n.newline() -n.comment('Core source files all build into ninja library.') cxxvariables = [] if platform.is_msvc(): cxxvariables = [('pdb', 'ninja.pdb')] + +n.comment('Generate a library for `ninja-re2c`.') +re2c_objs = [] +for name in ['depfile_parser', 'lexer']: + re2c_objs += cxx(name, variables=cxxvariables) +if platform.is_msvc(): + n.build(built('ninja-re2c.lib'), 'ar', re2c_objs) +else: + n.build(built('libninja-re2c.a'), 'ar', re2c_objs) +n.newline() + +n.comment('Core source files all build into ninja library.') +objs.extend(re2c_objs) for name in ['build', 'build_log', 'clean', 'clparser', 'debug_flags', - 'depfile_parser', 'deps_log', 'disk_interface', 'dyndep', @@ -512,7 +523,6 @@ for name in ['build', 'graph', 'graphviz', 'json', - 'lexer', 'line_printer', 'manifest_parser', 'metrics', |