diff options
author | Mathew Robinson <chasinglogic@gmail.com> | 2020-02-04 15:47:48 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-02-04 21:08:51 +0000 |
commit | ffb5317f9e373a80ec0369eeb402db6bd8e440d2 (patch) | |
tree | d064aa0e09342e8cfa04e814c1baedae9378de13 | |
parent | eac7c6e8efe97299cddbd106d9ea4b2ed90e846d (diff) | |
download | mongo-ffb5317f9e373a80ec0369eeb402db6bd8e440d2.tar.gz |
SERVER-45824 Only allow one output for rspfile ninja rules
-rw-r--r-- | site_scons/site_tools/ninja.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/site_scons/site_tools/ninja.py b/site_scons/site_tools/ninja.py index 99036b00125..68e3541cd48 100644 --- a/site_scons/site_tools/ninja.py +++ b/site_scons/site_tools/ninja.py @@ -601,20 +601,20 @@ class NinjaState: # Some rules like 'phony' and other builtins we don't have # listed in self.rules so verify that we got a result # before trying to check if it has a deps key. - if rule is not None and rule.get("deps"): - - # Anything using deps in Ninja can only have a single - # output, but we may have a build which actually - # produces multiple outputs which other targets can - # depend on. Here we slice up the outputs so we have a - # single output which we will use for the "real" - # builder and multiple phony targets that match the - # file names of the remaining outputs. This way any - # build can depend on any output from any build. + # + # Anything using deps or rspfile in Ninja can only have a single + # output, but we may have a build which actually produces + # multiple outputs which other targets can depend on. Here we + # slice up the outputs so we have a single output which we will + # use for the "real" builder and multiple phony targets that + # match the file names of the remaining outputs. This way any + # build can depend on any output from any build. + if rule is not None and (rule.get("deps") or rule.get("rspfile")): first_output, remaining_outputs = ( build["outputs"][0], build["outputs"][1:], ) + if remaining_outputs: ninja.build( outputs=remaining_outputs, rule="phony", implicit=first_output, |