diff options
-rw-r--r-- | SConstruct | 5 | ||||
-rw-r--r-- | etc/evergreen_yml_components/definitions.yml | 2 | ||||
-rw-r--r-- | site_scons/site_tools/ninja.py | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/SConstruct b/SConstruct index 8cb6eafa7d0..4b6e002b4eb 100644 --- a/SConstruct +++ b/SConstruct @@ -5354,7 +5354,10 @@ env.AddMethod(injectModule, 'InjectModule') if get_option('ninja') == 'disabled': compileCommands = env.CompilationDatabase('compile_commands.json') - compileDb = env.Alias("compiledb", compileCommands) + # Initialize generated-sources Alias as a placeholder so that it can be used as a + # dependency for compiledb. This Alias will be properly updated in other SConscripts. + generatedSources = env.Alias("generated-sources") + compileDb = env.Alias("compiledb", [compileCommands, generatedSources]) msvc_version = "" diff --git a/etc/evergreen_yml_components/definitions.yml b/etc/evergreen_yml_components/definitions.yml index 5cf2f49caca..b784cfef968 100644 --- a/etc/evergreen_yml_components/definitions.yml +++ b/etc/evergreen_yml_components/definitions.yml @@ -2385,7 +2385,7 @@ tasks: - *f_expansions_write - func: "scons compile" vars: - targets: generated-sources compiledb + targets: compiledb compiling_for_test: true - command: subprocess.exec type: test diff --git a/site_scons/site_tools/ninja.py b/site_scons/site_tools/ninja.py index 0b0d3ed88bf..d069e16382b 100644 --- a/site_scons/site_tools/ninja.py +++ b/site_scons/site_tools/ninja.py @@ -879,7 +879,7 @@ class NinjaState: ) ninja.build( - "compiledb", rule="phony", implicit=["compile_commands.json"], + "compiledb", rule="phony", implicit=["compile_commands.json"], order_only=[generated_sources_alias], ) # Look in SCons's list of DEFAULT_TARGETS, find the ones that |