diff options
author | 2017-02-13 18:02:00 +0000 | |
---|---|---|
committer | 2017-02-14 14:20:33 +0000 | |
commit | 655bafe74faeef1aa63752640a1e8b7b9505f43d (patch) | |
tree | 372c99bca3c4473945ebefd092fed4bde789b4ef /src/main/java/com/google/devtools/build/lib/rules/cpp/LTOBackendArtifacts.java | |
parent | d8eec343d238129ce8b5146c4177d207a6b3683b (diff) |
Stop retrieving FdoSupport statically from hard-coded attribute ":cc_toolchain" in RuleContext, instead take the provider from users and pass it around to where it is used.
This gives J2ObjcAspect the ability to specify the C++ toolchain attribute under a different name to avoid attribute conflicts with attached rules that have already declared attribute ":cc_toolchain".
--
PiperOrigin-RevId: 147358325
MOS_MIGRATED_REVID=147358325
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/LTOBackendArtifacts.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/cpp/LTOBackendArtifacts.java | 5 |
1 files changed, 3 insertions, 2 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 8b333b543c..32931bc719 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 @@ -109,6 +109,7 @@ public final class LTOBackendArtifacts { RuleContext ruleContext, FeatureConfiguration featureConfiguration, CcToolchainProvider ccToolchain, + FdoSupportProvider fdoSupport, boolean usePic, boolean generateDwo) { LTOBackendAction.Builder builder = new LTOBackendAction.Builder(); @@ -138,8 +139,8 @@ public final class LTOBackendArtifacts { // The input to the LTO backend step is the bitcode file. buildVariablesBuilder.addStringVariable( "thinlto_input_bitcode_file", bitcodeFile.getExecPath().toString()); - Artifact autoFdoProfile = CppHelper.getFdoSupport(ruleContext).buildProfileForLtoBackend( - featureConfiguration, buildVariablesBuilder, ruleContext); + Artifact autoFdoProfile = fdoSupport.getFdoSupport().buildProfileForLtoBackend( + fdoSupport, featureConfiguration, buildVariablesBuilder, ruleContext); if (autoFdoProfile != null) { builder.addInput(autoFdoProfile); } |