aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/cpp/FakeCppCompileAction.java
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2016-08-23 15:36:49 +0000
committerGravatar John Cater <jcater@google.com>2016-08-23 22:57:59 +0000
commitb6fd4ed25b6201eaaabb14c389c02819184ad4a6 (patch)
tree280e7d87dd6455377a0817c56ab2e6d8b9de1474 /src/main/java/com/google/devtools/build/lib/rules/cpp/FakeCppCompileAction.java
parent1077038d02a4151e156622076896eca1e4f28726 (diff)
Prune .pcm files based on the results of include scanning.
Basically, take the set of headers found by #include scanning and check what modules they are coming from. If a module provides at least one of the required headers, it is required as are all of its dependent modules (because of the way modules are implemented). Only use the actually required modules as compilation inputs and as flags handed in on the command line. Also move the logic to calculate top-level modules from the analysis phase into the execution phase. In the long run, we might be able to completely remove this logic now, but for now, we want to be able to quickly switch between the old and the new behavior. Thus, pruning of modules is now guarded on a feature prune_module_headers. -- MOS_MIGRATED_REVID=131058820
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/FakeCppCompileAction.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/FakeCppCompileAction.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/FakeCppCompileAction.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/FakeCppCompileAction.java
index 874f1fd608..e31ff2ee4b 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/FakeCppCompileAction.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/FakeCppCompileAction.java
@@ -65,6 +65,7 @@ public class FakeCppCompileAction extends CppCompileAction {
CcToolchainFeatures.Variables variables,
Artifact sourceFile,
boolean shouldScanIncludes,
+ boolean usePic,
Label sourceLabel,
NestedSet<Artifact> mandatoryInputs,
Artifact outputFile,
@@ -84,6 +85,7 @@ public class FakeCppCompileAction extends CppCompileAction {
variables,
sourceFile,
shouldScanIncludes,
+ usePic,
sourceLabel,
mandatoryInputs,
outputFile,