diff options
Diffstat (limited to 'src/main')
3 files changed, 4 insertions, 18 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/BinaryLinkingTargetFactory.java b/src/main/java/com/google/devtools/build/lib/rules/objc/BinaryLinkingTargetFactory.java index 2c0d336f56..0438091476 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/BinaryLinkingTargetFactory.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/BinaryLinkingTargetFactory.java @@ -154,6 +154,7 @@ abstract class BinaryLinkingTargetFactory implements RuleConfiguredTargetFactory .setCompilationAttributes(new CompilationAttributes(ruleContext)) .setResourceAttributes(new ResourceAttributes(ruleContext)) .setCompilationArtifacts(compilationArtifacts) + .addDefines(ruleContext.getTokenizedStringListAttr("defines")) .addDepObjcProviders(ruleContext.getPrerequisites("deps", Mode.TARGET, ObjcProvider.class)) .addDepObjcProviders( ruleContext.getPrerequisites("bundles", Mode.TARGET, ObjcProvider.class)) diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/IosTest.java b/src/main/java/com/google/devtools/build/lib/rules/objc/IosTest.java index 337d74dc69..d814c84bc7 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/IosTest.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/IosTest.java @@ -163,6 +163,6 @@ public abstract class IosTest implements RuleConfiguredTargetFactory { } return ObjcLibrary.common(ruleContext, extraSdkFrameworks, /*alwayslink=*/false, - new ObjcLibrary.ExtraImportLibraries(), new ObjcLibrary.Defines(), extraDepObjcProviders); + new ObjcLibrary.ExtraImportLibraries(), extraDepObjcProviders); } } 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 4136ffefce..702f9c1809 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 @@ -44,25 +44,11 @@ public class ObjcLibrary implements RuleConfiguredTargetFactory { } /** - * An {@link IterableWrapper} containing defines as specified in the {@code defines} attribute to - * be applied to this target and all depending targets' compilation actions. - */ - static final class Defines extends IterableWrapper<String> { - Defines(Iterable<String> defines) { - super(defines); - } - - Defines(String... defines) { - super(defines); - } - } - - /** * Constructs an {@link ObjcCommon} instance based on the attributes of the given rule. The rule * should inherit from {@link ObjcLibraryRule}.. */ static ObjcCommon common(RuleContext ruleContext, Iterable<SdkFramework> extraSdkFrameworks, - boolean alwayslink, ExtraImportLibraries extraImportLibraries, Defines defines, + boolean alwayslink, ExtraImportLibraries extraImportLibraries, Iterable<ObjcProvider> extraDepObjcProviders) { CompilationArtifacts compilationArtifacts = CompilationSupport.compilationArtifacts(ruleContext); @@ -71,7 +57,7 @@ public class ObjcLibrary implements RuleConfiguredTargetFactory { .setCompilationAttributes(new CompilationAttributes(ruleContext)) .setResourceAttributes(new ResourceAttributes(ruleContext)) .addExtraSdkFrameworks(extraSdkFrameworks) - .addDefines(defines) + .addDefines(ruleContext.getTokenizedStringListAttr("defines")) .setCompilationArtifacts(compilationArtifacts) .addDepObjcProviders(ruleContext.getPrerequisites("deps", Mode.TARGET, ObjcProvider.class)) .addDepObjcProviders( @@ -90,7 +76,6 @@ public class ObjcLibrary implements RuleConfiguredTargetFactory { ObjcCommon common = common( ruleContext, ImmutableList.<SdkFramework>of(), ruleContext.attributes().get("alwayslink", Type.BOOLEAN), new ExtraImportLibraries(), - new Defines(ruleContext.getTokenizedStringListAttr("defines")), ImmutableList.<ObjcProvider>of()); OptionsProvider optionsProvider = optionsProvider(ruleContext); |