diff options
author | 2017-09-28 10:31:33 -0400 | |
---|---|---|
committer | 2017-09-29 12:13:26 -0400 | |
commit | 650de07b68415f4ec4504e0d111959192c037db1 (patch) | |
tree | cbdfad16751661a0f107ee963c473765a7130739 /src/main/java | |
parent | c2b88a63a4f82a2bc7aefe18ab5e46746212b312 (diff) |
Remove the null lipo context collector from the objc rules, which do not use LIPO. Remove the check that requires a context collector to be present.
PiperOrigin-RevId: 170341259
Diffstat (limited to 'src/main/java')
3 files changed, 0 insertions, 24 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibraryHelper.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibraryHelper.java index 371690aba5..166ee77a3d 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibraryHelper.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibraryHelper.java @@ -47,7 +47,6 @@ import com.google.devtools.build.lib.collect.nestedset.NestedSet; import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder; import com.google.devtools.build.lib.collect.nestedset.Order; import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable; -import com.google.devtools.build.lib.packages.BuildType; import com.google.devtools.build.lib.packages.RuleClass.ConfiguredTargetFactory.RuleErrorException; import com.google.devtools.build.lib.rules.cpp.CcToolchainFeatures.FeatureConfiguration; import com.google.devtools.build.lib.rules.cpp.CcToolchainFeatures.Variables.VariablesExtension; @@ -933,13 +932,6 @@ public final class CcLibraryHelper { * @throws RuleErrorException */ public Info build() throws RuleErrorException, InterruptedException { - // Fail early if there is no lipo context collector on the rule - otherwise we end up failing - // in lipo optimization. - Preconditions.checkState( - // 'cc_inc_library' rules do not compile, and thus are not affected by LIPO. - ruleContext.getRule().getRuleClass().equals("cc_inc_library") - || ruleContext.isAttrDefined(":lipo_context_collector", BuildType.LABEL)); - if (checkDepsGenerateCpp) { for (LanguageDependentFragment dep : AnalysisUtils.getProviders(deps, LanguageDependentFragment.class)) { diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/J2ObjcAspect.java b/src/main/java/com/google/devtools/build/lib/rules/objc/J2ObjcAspect.java index 87c24ab678..5cda226943 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/J2ObjcAspect.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/J2ObjcAspect.java @@ -216,14 +216,6 @@ public class J2ObjcAspect extends NativeAspectClass implements ConfiguredAspectF Label.parseAbsoluteUnchecked( toolsRepository + "//tools/j2objc:j2objc_proto_blacklist")))) .add(attr(":j2objc_cc_toolchain", LABEL).value(ObjcRuleClasses.APPLE_TOOLCHAIN)) - .add( - // Objc builds do not use a lipo context collector, but must specify the attribute as - // a late-bound attribute to match with the similar attribute on the cc rules. - // TODO(b/28084560): Allow :lipo_context_collector not to be set instead of having a - // null instance. - attr(":lipo_context_collector", LABEL) - .value(LateBoundDefault.alwaysNull()) - .skipPrereqValidatorCheck()) .build(); } diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java index e292f000c6..c27e52a21d 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java @@ -524,14 +524,6 @@ public class ObjcRuleClasses { .add( attr(CcToolchain.CC_TOOLCHAIN_TYPE_ATTRIBUTE_NAME, LABEL) .value(CppRuleClasses.ccToolchainTypeAttribute(env))) - .add( - // Objc builds do not use a lipo context collector, but must specify the attribute as - // a late-bound attribute to match with the similar attribute on the cc rules. - // TODO(b/28084560): Allow :lipo_context_collector not to be set instead of having a - // null instance. - attr(":lipo_context_collector", LABEL) - .value(LateBoundDefault.alwaysNull()) - .skipPrereqValidatorCheck()) .addRequiredToolchains( ImmutableList.of(CppHelper.getCcToolchainType(env.getToolsRepository()))) .build(); |