diff options
author | Tausif Rahman <tausif.rahman@mongodb.com> | 2022-06-29 17:59:30 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-06-29 20:57:10 +0000 |
commit | 0dd56eb0358262ee0af4d2b172ec53c62ebb0233 (patch) | |
tree | c6a8add6ac099a4c73837074cace788daa018281 /site_scons/site_tools | |
parent | 22f51064e1697fc94518b4bae8b6beb7c5b10bd7 (diff) | |
download | mongo-0dd56eb0358262ee0af4d2b172ec53c62ebb0233.tar.gz |
SERVER-66938 Drastically simplify command to generate ninja files
Diffstat (limited to 'site_scons/site_tools')
-rw-r--r-- | site_scons/site_tools/ninja.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/site_scons/site_tools/ninja.py b/site_scons/site_tools/ninja.py index 97b9d25665f..5c1af72db2b 100644 --- a/site_scons/site_tools/ninja.py +++ b/site_scons/site_tools/ninja.py @@ -1498,7 +1498,6 @@ def generate(env): ninja_file_name = env.subst("${NINJA_PREFIX}.${NINJA_SUFFIX}") ninja_file = env.Ninja(target=ninja_file_name, source=[]) env.AlwaysBuild(ninja_file) - env.Alias("$NINJA_ALIAS_NAME", ninja_file) # TODO: API for getting the SConscripts programmatically # exists upstream: https://github.com/SCons/scons/issues/3625 @@ -1618,6 +1617,12 @@ def generate(env): if not exists(env): return + # There is a target called generate-ninja which needs to be included + # with the --ninja flag in order to generate the ninja file. Because the --ninja + # flag is ONLY used with generate-ninja, we have combined the two by making the --ninja flag + # implicitly build the generate-ninja target. + SCons.Script.BUILD_TARGETS = SCons.Script.TargetList(env.Alias("$NINJA_ALIAS_NAME", ninja_file)) + # Set a known variable that other tools can query so they can # behave correctly during ninja generation. env["GENERATING_NINJA"] = True |