diff options
author | 2017-10-07 08:09:27 +0200 | |
---|---|---|
committer | 2017-10-07 11:07:55 +0200 | |
commit | 0204bccf95dfaa01d15c21ffe9a64d04c5a6bf61 (patch) | |
tree | aeedb0b00ec1c09cd4304435d9f1a1357b507e8b /src/main/java/com/google | |
parent | a0c391e185b3baed9cb2eb237606cab1c48cda2b (diff) |
Add .imports file to the LTOBackendAction inputs
Building with --experimental_discard_orphaned_artifacts will cause the .imports
file produced by the LTO indexing action to not be preserved, unless it is marked
as an input to the LTOBackendAction. It is only used in the input discovery phase,
not as an input to the actual action, so it was not initially listed as an input.
RELNOTES: None
PiperOrigin-RevId: 171387388
Diffstat (limited to 'src/main/java/com/google')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/cpp/LtoBackendArtifacts.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/LtoBackendArtifacts.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/LtoBackendArtifacts.java index a7d59da23d..16d5a38eed 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/LtoBackendArtifacts.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/LtoBackendArtifacts.java @@ -119,6 +119,10 @@ public final class LtoBackendArtifacts { builder.addInput(bitcodeFile); builder.addInput(index); + // Although the imports file is not used by the LTOBackendAction while the action is executing, + // it is needed during the input discovery phase, and we must list it as an input to the action + // in order for it to be preserved under --experimental_discard_orphaned_artifacts. + builder.addInput(imports); builder.addTransitiveInputs(ccToolchain.getCompile()); builder.addOutput(objectFile); |