diff options
author | 2018-05-30 14:34:50 -0700 | |
---|---|---|
committer | 2018-05-30 14:36:16 -0700 | |
commit | a9eb2403e2832859cbce5e6a06f4142ea4acd9c8 (patch) | |
tree | fcfb3d5e2a9b7f46b8498824ce4c6cc3a9f34b2c /src/main/java/com | |
parent | a8a8e7a0e979a8e4cf14c32471ad349a1b7d47cc (diff) |
Remove the non_propagated_deps attribute from objc_library and apple_binary. This was a workaround created to deal with duplicated symbol errors, but there are now better ways to avoid them than using this attribute.
RELNOTES: non_propagated_deps has been removed from objc_library and apple_binary.
PiperOrigin-RevId: 198620886
Diffstat (limited to 'src/main/java/com')
5 files changed, 0 insertions, 46 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/AppleBinary.java b/src/main/java/com/google/devtools/build/lib/rules/objc/AppleBinary.java index 9b6c5ae54c..af4f975ce4 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/AppleBinary.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/AppleBinary.java @@ -139,9 +139,6 @@ public class AppleBinary implements RuleConfiguredTargetFactory { AppleConfiguration appleConfiguration = ruleContext.getFragment(AppleConfiguration.class); ApplePlatform platform = appleConfiguration.getMultiArchPlatform(platformType); - ImmutableListMultimap<BuildConfiguration, ObjcProvider> configurationToNonPropagatedObjcMap = - ruleContext.getPrerequisitesByConfiguration( - "non_propagated_deps", Mode.SPLIT, ObjcProvider.SKYLARK_CONSTRUCTOR); ImmutableListMultimap<BuildConfiguration, TransitiveInfoCollection> configToDepsCollectionMap = ruleContext.getPrerequisitesByConfiguration("deps", Mode.SPLIT); ImmutableListMultimap<BuildConfiguration, ConfiguredTargetAndData> @@ -160,7 +157,6 @@ public class AppleBinary implements RuleConfiguredTargetFactory { childConfigurations, configToDepsCollectionMap, configToCTATDepsCollectionMap, - configurationToNonPropagatedObjcMap, getDylibProviderTargets(ruleContext)); Map<String, NestedSet<Artifact>> outputGroupCollector = new TreeMap<>(); diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/CompilationAttributes.java b/src/main/java/com/google/devtools/build/lib/rules/objc/CompilationAttributes.java index f3c79b270b..8bac4e661a 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/CompilationAttributes.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/CompilationAttributes.java @@ -274,14 +274,6 @@ final class CompilationAttributes { moduleMaps.addTransitive(provider.get(TOP_LEVEL_MODULE_MAP)); } } - if (ruleContext.attributes().has("non_propagated_deps", BuildType.LABEL_LIST)) { - Iterable<ObjcProvider> providers = - ruleContext.getPrerequisites( - "non_propagated_deps", Mode.TARGET, ObjcProvider.SKYLARK_CONSTRUCTOR); - for (ObjcProvider provider : providers) { - moduleMaps.addTransitive(provider.get(TOP_LEVEL_MODULE_MAP)); - } - } } builder.addModuleMapsForDirectDeps(moduleMaps.build()); diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/MultiArchBinarySupport.java b/src/main/java/com/google/devtools/build/lib/rules/objc/MultiArchBinarySupport.java index c648b78183..ce853bd8b3 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/MultiArchBinarySupport.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/MultiArchBinarySupport.java @@ -202,8 +202,6 @@ public class MultiArchBinarySupport { * dependencies of the current rule are built * @param configToDepsCollectionMap a map from child configuration to providers that "deps" of the * current rule have propagated in that configuration - * @param configurationToNonPropagatedObjcMap a map from child configuration to providers that - * "non_propagated_deps" of the current rule have propagated in that configuration * @param dylibProviders {@link TransitiveInfoCollection}s that dynamic library dependencies of * the current rule have propagated * @throws RuleErrorException if there are attribute errors in the current rule context @@ -213,7 +211,6 @@ public class MultiArchBinarySupport { ImmutableListMultimap<BuildConfiguration, TransitiveInfoCollection> configToDepsCollectionMap, ImmutableListMultimap<BuildConfiguration, ConfiguredTargetAndData> configToCTATDepsCollectionMap, - ImmutableListMultimap<BuildConfiguration, ObjcProvider> configurationToNonPropagatedObjcMap, Iterable<TransitiveInfoCollection> dylibProviders) throws RuleErrorException, InterruptedException { Iterable<ObjcProvider> dylibObjcProviders = getDylibObjcProviders(dylibProviders); @@ -259,7 +256,6 @@ public class MultiArchBinarySupport { childConfig, intermediateArtifacts, nullToEmptyList(configToCTATDepsCollectionMap.get(childConfig)), - nullToEmptyList(configurationToNonPropagatedObjcMap.get(childConfig)), additionalDepProviders); ObjcProvider objcProviderWithDylibSymbols = common.getObjcProvider(); ObjcProvider objcProvider = @@ -301,7 +297,6 @@ public class MultiArchBinarySupport { BuildConfiguration buildConfiguration, IntermediateArtifacts intermediateArtifacts, List<ConfiguredTargetAndData> propagatedConfiguredTargetAndDataDeps, - List<ObjcProvider> nonPropagatedObjcDeps, Iterable<ObjcProvider> additionalDepProviders) throws InterruptedException { ObjcCommon.Builder commonBuilder = @@ -310,7 +305,6 @@ public class MultiArchBinarySupport { CompilationAttributes.Builder.fromRuleContext(ruleContext).build()) .addDeps(propagatedConfiguredTargetAndDataDeps) .addDepObjcProviders(additionalDepProviders) - .addNonPropagatedDepObjcProviders(nonPropagatedObjcDeps) .setIntermediateArtifacts(intermediateArtifacts) .setAlwayslink(false) .setLinkedBinary(intermediateArtifacts.strippedSingleArchitectureBinary()); diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcLibrary.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcLibrary.java index cd1793139b..42741b573b 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcLibrary.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcLibrary.java @@ -52,9 +52,6 @@ public class ObjcLibrary implements RuleConfiguredTargetFactory { .addRuntimeDeps(ruleContext.getPrerequisites("runtime_deps", Mode.TARGET)) .addDepObjcProviders( ruleContext.getPrerequisites("bundles", Mode.TARGET, ObjcProvider.SKYLARK_CONSTRUCTOR)) - .addNonPropagatedDepObjcProviders( - ruleContext.getPrerequisites( - "non_propagated_deps", Mode.TARGET, ObjcProvider.SKYLARK_CONSTRUCTOR)) .setIntermediateArtifacts(ObjcRuleClasses.intermediateArtifacts(ruleContext)) .setAlwayslink(ruleContext.attributes().get("alwayslink", Type.BOOLEAN)) .setHasModuleMap() 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 ab4197c3ef..f510105dd6 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 @@ -667,18 +667,6 @@ public class ObjcRuleClasses { .direct_compile_time_input() .allowedRuleClasses("objc_framework") .allowedFileTypes()) - /* <!-- #BLAZE_RULE($objc_compiling_rule).ATTRIBUTE(non_propagated_deps) --> - The list of targets that are required in order to build this target, - but which are not included in the final bundle. - This attribute should only rarely be used, and probably only for proto - dependencies. - <!-- #END_BLAZE_RULE.ATTRIBUTE -->*/ - .add( - attr("non_propagated_deps", LABEL_LIST) - .direct_compile_time_input() - .allowedRuleClasses(ALLOWED_CC_DEPS_RULE_CLASSES) - .mandatoryProviders(ObjcProvider.SKYLARK_CONSTRUCTOR.id()) - .allowedFileTypes()) /* <!-- #BLAZE_RULE($objc_compiling_rule).ATTRIBUTE(defines) --> Extra <code>-D</code> flags to pass to the compiler. They should be in the form <code>KEY=VALUE</code> or simply <code>KEY</code> and are @@ -975,19 +963,6 @@ public class ObjcRuleClasses { Extra flags to pass to the linker. <!-- #END_BLAZE_RULE.ATTRIBUTE -->*/ .add(attr("linkopts", STRING_LIST)) - /* <!-- #BLAZE_RULE($apple_multiarch_rule).ATTRIBUTE(non_propagated_deps) --> - The list of targets that are required in order to build this target, - but which are not included in the final binary. - This attribute should only rarely be used, and probably only for proto - dependencies. - <!-- #END_BLAZE_RULE.ATTRIBUTE -->*/ - .add( - attr("non_propagated_deps", LABEL_LIST) - .direct_compile_time_input() - .allowedRuleClasses(ALLOWED_CC_DEPS_RULE_CLASSES) - .mandatoryProviders(ObjcProvider.SKYLARK_CONSTRUCTOR.id()) - .cfg(splitTransitionProvider) - .allowedFileTypes()) .add( attr("$j2objc_dead_code_pruner", LABEL) .allowedFileTypes(FileType.of(".py")) |