diff options
author | Ken Matsui <26405363+ken-matsui@users.noreply.github.com> | 2022-05-31 13:25:47 (GMT) |
---|---|---|
committer | Ken Matsui <26405363+ken-matsui@users.noreply.github.com> | 2022-05-31 13:25:47 (GMT) |
commit | 8e0af0809cd8e5403ad0410e6fd75c94934ca75d (patch) | |
tree | 3a8de169c48a546e48529ff1ed0b18ddca5f9b0c /configure.py | |
parent | 55f54511d35716c43637dee2bcb5fbc7839f967b (diff) | |
download | Ninja-8e0af0809cd8e5403ad0410e6fd75c94934ca75d.zip Ninja-8e0af0809cd8e5403ad0410e6fd75c94934ca75d.tar.gz Ninja-8e0af0809cd8e5403ad0410e6fd75c94934ca75d.tar.bz2 |
Support building `libninja-re2c.a` on `configure.py`
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/configure.py b/configure.py index 4390434..f24d1f8 100755 --- a/configure.py +++ b/configure.py @@ -489,16 +489,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', @@ -508,7 +519,6 @@ for name in ['build', 'graph', 'graphviz', 'json', - 'lexer', 'line_printer', 'manifest_parser', 'metrics', |