aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java
diff options
context:
space:
mode:
authorGravatar Manuel Klimek <klimek@google.com>2016-01-22 15:18:53 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2016-01-22 15:58:53 +0000
commit4fdd66db55d36c923b1e9fa30a158e1596408670 (patch)
tree561d7849160e634035c4acd046c75857ba8077d8 /src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java
parentf8ff07aad7d523e0902768768b3776f15a260383 (diff)
Allow switching on header processing (parse_headers or preprocess_headers)
for targets in the transitive closure of a target that is built. Previously, this would only happen if a link action for the library containing the headers was also built; this specifically means it did not trigger if a library didn't contain source files, as there is no link action for such libraries. That led to no header-only libraries would get their headers parsed, which includes all cc_public_library rules. Adding a flag to introduce this under so we can switch it on independently from the blaze release. Once it is switched on, we can remove the edges in the action graph from the link actions to the header processing actions. -- MOS_MIGRATED_REVID=112782219
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java
index 31aa2f0fee..71045e4fd0 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java
@@ -1526,6 +1526,13 @@ public class CppConfiguration extends BuildConfiguration.Fragment {
public boolean skipStaticOutputs() {
return cppOptions.skipStaticOutputs;
}
+
+ /**
+ * Returns whether we are processing headers in dependencies of built C++ targets.
+ */
+ public boolean processHeadersInDependencies() {
+ return cppOptions.processHeadersInDependencies;
+ }
/**
* Returns true if Fission is specified for this build and supported by the crosstool.