diff options
author | ajmichael <ajmichael@google.com> | 2017-05-02 01:27:18 +0200 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2017-05-02 11:27:14 +0200 |
commit | 62453079f729cd6247262a964010701af931620f (patch) | |
tree | 58c4127f05c0ef24b55ecf1e094016fd05be044b /src/main/java/com/google/devtools/build/lib/rules | |
parent | bfacec0b3f26b2e851df5a847a51858dbedb45a7 (diff) |
Automated g4 rollback of commit 27a136b9bbb4d73b0a343d407b5da9f890175aea.
*** Reason for rollback ***
PiperOrigin-RevId: 154776438
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java index ea18ab94cb..597e5dd1a8 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java @@ -531,10 +531,9 @@ public final class CcCommon { * * @param ruleContext the context of the rule we want the feature configuration for. * @param ruleSpecificRequestedFeatures features that will be requested, and thus be always - * enabled if the toolchain supports them. + * enabled if the toolchain supports them. * @param ruleSpecificUnsupportedFeatures features that are not supported in the current context. * @param sourceCategory the source category for this build. - * @param toolchain the current toolchain provider * @return the feature configuration for the given {@code ruleContext}. */ public static FeatureConfiguration configureFeatures( @@ -543,34 +542,6 @@ public final class CcCommon { Set<String> ruleSpecificUnsupportedFeatures, SourceCategory sourceCategory, CcToolchainProvider toolchain) { - return configureFeatures( - ruleContext, - ruleSpecificRequestedFeatures, - ruleSpecificUnsupportedFeatures, - sourceCategory, - toolchain, - toolchain.getFeatures()); - } - - /** - * Creates the feature configuration for a given rule. - * - * @param ruleContext the context of the rule we want the feature configuration for. - * @param ruleSpecificRequestedFeatures features that will be requested, and thus be always - * enabled if the toolchain supports them. - * @param ruleSpecificUnsupportedFeatures features that are not supported in the current context. - * @param sourceCategory the source category for this build. - * @param toolchain the current toolchain provider - * @param features CcToolchainFeatures instance to use to get FeatureConfiguration - * @return the feature configuration for the given {@code ruleContext}. - */ - public static FeatureConfiguration configureFeatures( - RuleContext ruleContext, - Set<String> ruleSpecificRequestedFeatures, - Set<String> ruleSpecificUnsupportedFeatures, - SourceCategory sourceCategory, - CcToolchainProvider toolchain, - CcToolchainFeatures features) { ImmutableSet.Builder<String> unsupportedFeaturesBuilder = ImmutableSet.builder(); unsupportedFeaturesBuilder.addAll(ruleSpecificUnsupportedFeatures); if (!toolchain.supportsHeaderParsing()) { @@ -600,7 +571,7 @@ public final class CcCommon { requestedFeatures.addAll(sourceCategory.getActionConfigSet()); FeatureConfiguration configuration = - features.getFeatureConfiguration(requestedFeatures.build()); + toolchain.getFeatures().getFeatureConfiguration(requestedFeatures.build()); for (String feature : unsupportedFeatures) { if (configuration.isEnabled(feature)) { ruleContext.ruleError("The C++ toolchain '" |