aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcBinaryRule.java
diff options
context:
space:
mode:
authorGravatar Ulf Adams <ulfjack@google.com>2015-02-19 11:16:26 +0000
committerGravatar Han-Wen Nienhuys <hanwen@google.com>2015-02-19 11:16:26 +0000
commitfbef62b5ef27ecb783157f993792c6325392b1a0 (patch)
tree62a818054625bf877df6359fb5d7ba9ffaf74d57 /src/main/java/com/google/devtools/build/lib/rules/objc/ObjcBinaryRule.java
parentff3bedd79ddac983573bb1e4c8791ea4339d7e45 (diff)
Scrub.
Also includes the following changes: Skylark: tests copy the Skylark files into the same directory. Load statements are replaced with relative paths within bzl files and with absolute paths in tests. -- Refactor Objc abstract rule classes. This new arrangement groups attributes by logical purpose and clarifies rule composition. For example objc_binary inherits "linking" whereas an objc_library inherits "linkable" but both inherit "compiling". The only functional change in this CL is to remove the "data" attribute from all rules as it is not used in the depot and doesn't make sense when we also allow specifying resources in any number of other ways. -- MOS_MIGRATED_REVID=86676190
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc/ObjcBinaryRule.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/objc/ObjcBinaryRule.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcBinaryRule.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcBinaryRule.java
index c9fc57e36c..97c7ee41ea 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcBinaryRule.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcBinaryRule.java
@@ -14,6 +14,7 @@
package com.google.devtools.build.lib.rules.objc;
+import com.google.devtools.build.lib.analysis.BaseRuleClasses;
import com.google.devtools.build.lib.analysis.BlazeRule;
import com.google.devtools.build.lib.analysis.RuleDefinition;
import com.google.devtools.build.lib.analysis.RuleDefinitionEnvironment;
@@ -24,15 +25,19 @@ import com.google.devtools.build.lib.packages.RuleClass.Builder;
/**
* Rule definition for objc_binary.
*/
+// TODO(bazel-team): Remove bundling functionality (dependency on ApplicationRule, IPA output).
@BlazeRule(name = "objc_binary",
factoryClass = ObjcBinary.class,
- ancestors = { ObjcLibraryRule.class, IosApplicationRule.class })
+ ancestors = {
+ BaseRuleClasses.BaseRule.class,
+ ObjcRuleClasses.LinkingRule.class,
+ ObjcRuleClasses.XcodegenRule.class,
+ ObjcRuleClasses.ReleaseBundlingRule.class })
public class ObjcBinaryRule implements RuleDefinition {
@Override
- public RuleClass build(Builder builder, final RuleDefinitionEnvironment env) {
+ public RuleClass build(Builder builder, RuleDefinitionEnvironment env) {
return builder
- // TODO(bazel-team): Remove bundling functionality (dependency on IosApplicationRule).
/*<!-- #BLAZE_RULE(objc_binary).IMPLICIT_OUTPUTS -->
<ul>
<li><code><var>name</var>.ipa</code>: the application bundle as an <code>.ipa</code>
@@ -43,8 +48,6 @@ public class ObjcBinaryRule implements RuleDefinition {
<!-- #END_BLAZE_RULE.IMPLICIT_OUTPUTS -->*/
.setImplicitOutputsFunction(
ImplicitOutputsFunction.fromFunctions(ApplicationSupport.IPA, XcodeSupport.PBXPROJ))
- .removeAttribute("binary")
- .removeAttribute("alwayslink")
.build();
}
}