aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/cpp/CppModel.java
diff options
context:
space:
mode:
authorGravatar Lukacs Berki <lberki@google.com>2016-04-06 12:31:07 +0000
committerGravatar Lukacs Berki <lberki@google.com>2016-04-07 11:45:11 +0000
commitc0e5bc50f946c6b127485aeee133c149283ae352 (patch)
treecd382125be5cc2a5132646312c164f2c95be90c1 /src/main/java/com/google/devtools/build/lib/rules/cpp/CppModel.java
parentc23ba45553699b5d8b8ac1520adb307fd7e4e7ee (diff)
Move FDO support to the analysis phase by wrapping FdoSupport in its own SkyFunction.
This removes one of the two reasons for the existence of BuildConfiguration#prepareToBuild() which makes implementing dynamic configurations impossible and also makes FDO support halfway sane; now FDO is exactly as ugly as remote repositories, that is to say, reasonably okay. Ideally, we'd implement the zip extraction as an Action and make it a TreeArtifact, but support for TreeArtifacts is not mature yet enough, so it's not possible at the moment. -- MOS_MIGRATED_REVID=119150223
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/CppModel.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CppModel.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppModel.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppModel.java
index c8a8c1a19b..bd8bbfa1a2 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppModel.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppModel.java
@@ -287,7 +287,7 @@ public final class CppModel {
}
builder.setExtraSystemIncludePrefixes(additionalIncludes);
- builder.setFdoBuildStamp(CppHelper.getFdoBuildStamp(cppConfiguration));
+ builder.setFdoBuildStamp(CppHelper.getFdoBuildStamp(ruleContext));
builder.setFeatureConfiguration(featureConfiguration);
return builder;
}
@@ -367,8 +367,8 @@ public final class CppModel {
}
if (ccRelativeName != null) {
- cppConfiguration.getFdoSupport().configureCompilation(builder, buildVariables, ruleContext,
- ccRelativeName, autoFdoImportPath, usePic, featureConfiguration);
+ CppHelper.getFdoSupport(ruleContext).configureCompilation(builder, buildVariables,
+ ruleContext, ccRelativeName, autoFdoImportPath, usePic, featureConfiguration);
}
if (gcnoFile != null) {
buildVariables.addVariable("gcov_gcno_file", gcnoFile.getExecPathString());