diff options
author | 2017-02-17 14:16:45 +0000 | |
---|---|---|
committer | 2017-02-17 14:57:15 +0000 | |
commit | c0cb3fe3e746a36a07419fad4c70b459cc0ff23e (patch) | |
tree | df246dd51a5c84637e7d4ea9e2e32a7ffb5abdab | |
parent | 76cb02e5a95f7a854eabe3221c366ea804696b17 (diff) |
Rollback of commit 8bae4f4e99594118b7ce651f7779f92e7683cdd0.
*** Reason for rollback ***
Reverting this because we need to revert commit 4b73e972d909bcd533f2f9940f95a00b9b73bdde. (See unknown commit).
*** Original change description ***
CppCompileAction must return false from inputsKnown for .d pruning
This is necessary (but not sufficient) for the action cache to work
correctly. Consider the following sequence of events:
1. action is executed
2. .d pruning is performed
3. action cache writes entry with post-pruning inputs list
4. action gets regenerated (e.g., due to server restart)
5. the action cache calls inputsKnown(), which returns true
6. action cache checks entry from step 3 against pre-pruning inputs list,
which re...
***
--
PiperOrigin-RevId: 147831409
MOS_MIGRATED_REVID=147831409
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java index 7f433726c6..3f8437087f 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java @@ -334,11 +334,9 @@ public class CppCompileAction extends AbstractAction // the inputs are as declared, hence known, and remain so. this.shouldScanIncludes = shouldScanIncludes; this.shouldPruneModules = shouldPruneModules; - // We can only prune modules if include scanning is enabled. - Preconditions.checkArgument(!shouldPruneModules || shouldScanIncludes, this); this.usePic = usePic; this.useHeaderModules = useHeaderModules; - this.inputsKnown = !shouldScanIncludes && !cppSemantics.needsDotdInputPruning(); + this.inputsKnown = !shouldScanIncludes; this.cppCompileCommandLine = new CppCompileCommandLine( sourceFile, dotdFile, copts, coptsFilter, features, variables, actionName); |