diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/CppHelper.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/cpp/CppHelper.java | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppHelper.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppHelper.java index a192983cb0..fa2531f0f7 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppHelper.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppHelper.java @@ -108,34 +108,6 @@ public class CppHelper { } /** - * Merges the STL and toolchain contexts into context builder. The STL is automatically determined - * using the ":stl" attribute. - */ - public static void mergeToolchainDependentCcCompilationContext( - RuleContext ruleContext, - CcToolchainProvider toolchain, - CcCompilationContext.Builder ccCompilationContextBuilder) { - if (ruleContext.getRule().getAttributeDefinition(":stl") != null) { - TransitiveInfoCollection stl = ruleContext.getPrerequisite(":stl", Mode.TARGET); - if (stl != null) { - CcCompilationInfo ccCompilationInfo = stl.get(CcCompilationInfo.PROVIDER); - CcCompilationContext ccCompilationContext = - ccCompilationInfo != null ? ccCompilationInfo.getCcCompilationContext() : null; - if (ccCompilationContext == null) { - ruleContext.ruleError( - "Unable to merge the STL '" + stl.getLabel() + "' and toolchain contexts"); - return; - } - ccCompilationContextBuilder.mergeDependentCcCompilationContext(ccCompilationContext); - } - } - if (toolchain != null) { - ccCompilationContextBuilder.mergeDependentCcCompilationContext( - toolchain.getCcCompilationContext()); - } - } - - /** * Returns the malloc implementation for the given target. */ public static TransitiveInfoCollection mallocForTarget( |