Skip to content

Commit

Permalink
Remove xcodeproj as implicit output.
Browse files Browse the repository at this point in the history
RELNOTES[INC]: Blaze no longer generates xcode projects. Use tulsi.bazel.build
instead.

PiperOrigin-RevId: 154997997
  • Loading branch information
aragos authored and damienmg committed May 4, 2017
1 parent cc21998 commit 5f1d886
Show file tree
Hide file tree
Showing 14 changed files with 59 additions and 117 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import com.google.devtools.build.lib.analysis.BaseRuleClasses;
import com.google.devtools.build.lib.analysis.RuleDefinition;
import com.google.devtools.build.lib.analysis.RuleDefinitionEnvironment;
import com.google.devtools.build.lib.packages.ImplicitOutputsFunction;
import com.google.devtools.build.lib.packages.RuleClass;
import com.google.devtools.build.lib.packages.RuleClass.Builder;
import com.google.devtools.build.lib.rules.apple.AppleConfiguration;
Expand All @@ -51,46 +50,44 @@ public RuleClass build(Builder builder, RuleDefinitionEnvironment env) {
<ul>
<li><code><var>name</var>.ipa</code>: the extension bundle as an <code>.ipa</code>
file</li>
<li><code><var>name</var>.xcodeproj/project.pbxproj</code>: An Xcode project file which
can be used to develop or build on a Mac.</li>
</ul>
<!-- #END_BLAZE_RULE.IMPLICIT_OUTPUTS -->*/
.setImplicitOutputsFunction(
ImplicitOutputsFunction.fromFunctions(ReleaseBundlingSupport.IPA, XcodeSupport.PBXPROJ))
.setImplicitOutputsFunction(ReleaseBundlingSupport.IPA)
/* <!-- #BLAZE_RULE(apple_watch1_extension).ATTRIBUTE(binary) -->
The binary target containing the logic for the watch extension. This must be an
<code>apple_watch1_extension_binary</code> target.
<!-- #END_BLAZE_RULE.ATTRIBUTE -->*/
.add(attr("binary", LABEL)
.allowedRuleClasses("apple_watch_extension_binary")
.allowedFileTypes()
.mandatory()
.direct_compile_time_input()
.cfg(AppleWatch1Extension.MINIMUM_OS_AND_SPLIT_ARCH_TRANSITION))
.add(
attr("binary", LABEL)
.allowedRuleClasses("apple_watch_extension_binary")
.allowedFileTypes()
.mandatory()
.direct_compile_time_input()
.cfg(AppleWatch1Extension.MINIMUM_OS_AND_SPLIT_ARCH_TRANSITION))
/* <!-- #BLAZE_RULE(apple_watch1_extension).ATTRIBUTE(app_deps) -->
The list of targets whose resources files are bundled together to form final watch
application bundle.
<!-- #END_BLAZE_RULE.ATTRIBUTE -->*/
.add(attr(WATCH_APP_DEPS_ATTR, LABEL_LIST)
.direct_compile_time_input()
.allowedRuleClasses(ALLOWED_DEPS_RULE_CLASSES)
.allowedFileTypes()
.cfg(AppleWatch1Extension.MINIMUM_OS_AND_SPLIT_ARCH_TRANSITION))
/* <!-- #BLAZE_RULE(apple_watch1_extension).ATTRIBUTE(ext_families) -->
The device families to which the watch extension is targeted.
.add(
attr(WATCH_APP_DEPS_ATTR, LABEL_LIST)
.direct_compile_time_input()
.allowedRuleClasses(ALLOWED_DEPS_RULE_CLASSES)
.allowedFileTypes()
.cfg(AppleWatch1Extension.MINIMUM_OS_AND_SPLIT_ARCH_TRANSITION))
/* <!-- #BLAZE_RULE(apple_watch1_extension).ATTRIBUTE(ext_families) -->
The device families to which the watch extension is targeted.
This is known as the <code>TARGETED_DEVICE_FAMILY</code> build setting
in Xcode project files. It is a list of one or more of the strings
<code>"iphone"</code> and <code>"ipad"</code>.
This is known as the <code>TARGETED_DEVICE_FAMILY</code> build setting
in Xcode project files. It is a list of one or more of the strings
<code>"iphone"</code> and <code>"ipad"</code>.
<p>By default this is set to <code>"iphone"</code>. If it is explicitly specified it may not
be empty.</p>
<p>The watch application is always built for <code>"watch"</code> for device builds and
<code>"iphone, watch"</code> for simulator builds.
<!-- #END_BLAZE_RULE.ATTRIBUTE -->*/
.add(
attr(WATCH_EXT_FAMILIES_ATTR, STRING_LIST)
.value(ImmutableList.of(TargetDeviceFamily.IPHONE.getNameInRule())))
<p>By default this is set to <code>"iphone"</code>. If it is explicitly specified it may not
be empty.</p>
<p>The watch application is always built for <code>"watch"</code> for device builds and
<code>"iphone, watch"</code> for simulator builds.
<!-- #END_BLAZE_RULE.ATTRIBUTE -->*/
.add(
attr(WATCH_EXT_FAMILIES_ATTR, STRING_LIST)
.value(ImmutableList.of(TargetDeviceFamily.IPHONE.getNameInRule())))
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ public RuleClass build(Builder builder, RuleDefinitionEnvironment env) {
return builder
.requiresConfigurationFragments(ObjcConfiguration.class, J2ObjcConfiguration.class,
AppleConfiguration.class, CppConfiguration.class)
/*<!-- #BLAZE_RULE(apple_watch_extension_binary).IMPLICIT_OUTPUTS -->
<ul>
<li><code><var>name</var>.xcodeproj/project.pbxproj</code>: An Xcode project file which
can be used to develop or build on a Mac.</li>
</ul>
<!-- #END_BLAZE_RULE.IMPLICIT_OUTPUTS -->*/
.setImplicitOutputsFunction(XcodeSupport.PBXPROJ)
.cfg(AppleCrosstoolTransition.APPLE_CROSSTOOL_TRANSITION)
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import com.google.devtools.build.lib.analysis.BaseRuleClasses;
import com.google.devtools.build.lib.analysis.RuleDefinition;
import com.google.devtools.build.lib.analysis.RuleDefinitionEnvironment;
import com.google.devtools.build.lib.packages.ImplicitOutputsFunction;
import com.google.devtools.build.lib.packages.RuleClass;
import com.google.devtools.build.lib.packages.RuleClass.Builder;
import com.google.devtools.build.lib.rules.apple.AppleConfiguration;
Expand All @@ -32,9 +31,7 @@ public RuleClass build(Builder builder, RuleDefinitionEnvironment env) {
return builder
.requiresConfigurationFragments(
ObjcConfiguration.class, AppleConfiguration.class, CppConfiguration.class)
.setImplicitOutputsFunction(
ImplicitOutputsFunction.fromFunctions(
CompilationSupport.FULLY_LINKED_LIB, XcodeSupport.PBXPROJ))
.setImplicitOutputsFunction(CompilationSupport.FULLY_LINKED_LIB)
.cfg(AppleCrosstoolTransition.APPLE_CROSSTOOL_TRANSITION)
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import com.google.devtools.build.lib.analysis.BaseRuleClasses;
import com.google.devtools.build.lib.analysis.RuleDefinition;
import com.google.devtools.build.lib.analysis.RuleDefinitionEnvironment;
import com.google.devtools.build.lib.packages.ImplicitOutputsFunction;
import com.google.devtools.build.lib.packages.RuleClass;
import com.google.devtools.build.lib.packages.RuleClass.Builder;
import com.google.devtools.build.lib.rules.apple.AppleConfiguration;
Expand All @@ -46,12 +45,9 @@ public RuleClass build(Builder builder, RuleDefinitionEnvironment env) {
<ul>
<li><code><var>name</var>.ipa</code>: the application bundle as an <code>.ipa</code>
file
<li><code><var>name</var>.xcodeproj/project.pbxproj</code>: An Xcode project file which
can be used to develop or build on a Mac.
</ul>
<!-- #END_BLAZE_RULE.IMPLICIT_OUTPUTS -->*/
.setImplicitOutputsFunction(
ImplicitOutputsFunction.fromFunctions(ReleaseBundlingSupport.IPA, XcodeSupport.PBXPROJ))
.setImplicitOutputsFunction(ReleaseBundlingSupport.IPA)
/* <!-- #BLAZE_RULE(ios_application).ATTRIBUTE(binary) -->
The binary target included in the final bundle.
<!-- #END_BLAZE_RULE.ATTRIBUTE -->*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ public RuleClass build(Builder builder, RuleDefinitionEnvironment env) {
return builder
.requiresConfigurationFragments(ObjcConfiguration.class, J2ObjcConfiguration.class,
AppleConfiguration.class, CppConfiguration.class)
/*<!-- #BLAZE_RULE(ios_extension_binary).IMPLICIT_OUTPUTS -->
<ul>
<li><code><var>name</var>.xcodeproj/project.pbxproj</code>: An Xcode project file which
can be used to develop or build on a Mac.</li>
</ul>
<!-- #END_BLAZE_RULE.IMPLICIT_OUTPUTS -->*/
.setImplicitOutputsFunction(XcodeSupport.PBXPROJ)
.cfg(AppleCrosstoolTransition.APPLE_CROSSTOOL_TRANSITION)
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import com.google.devtools.build.lib.analysis.BaseRuleClasses;
import com.google.devtools.build.lib.analysis.RuleDefinition;
import com.google.devtools.build.lib.analysis.RuleDefinitionEnvironment;
import com.google.devtools.build.lib.packages.ImplicitOutputsFunction;
import com.google.devtools.build.lib.packages.RuleClass;
import com.google.devtools.build.lib.packages.RuleClass.Builder;
import com.google.devtools.build.lib.rules.apple.AppleConfiguration;
Expand All @@ -42,21 +41,19 @@ public RuleClass build(Builder builder, RuleDefinitionEnvironment env) {
<ul>
<li><code><var>name</var>.ipa</code>: the extension bundle as an <code>.ipa</code>
file</li>
<li><code><var>name</var>.xcodeproj/project.pbxproj</code>: An Xcode project file which
can be used to develop or build on a Mac.</li>
</ul>
<!-- #END_BLAZE_RULE.IMPLICIT_OUTPUTS -->*/
.setImplicitOutputsFunction(
ImplicitOutputsFunction.fromFunctions(ReleaseBundlingSupport.IPA, XcodeSupport.PBXPROJ))
.setImplicitOutputsFunction(ReleaseBundlingSupport.IPA)
/* <!-- #BLAZE_RULE(ios_extension).ATTRIBUTE(binary) -->
The binary target containing the logic for the extension.
<!-- #END_BLAZE_RULE.ATTRIBUTE -->*/
.add(attr("binary", LABEL)
.allowedRuleClasses("ios_extension_binary")
.allowedFileTypes()
.mandatory()
.direct_compile_time_input()
.cfg(IosExtension.MINIMUM_OS_AND_SPLIT_ARCH_TRANSITION))
.add(
attr("binary", LABEL)
.allowedRuleClasses("ios_extension_binary")
.allowedFileTypes()
.mandatory()
.direct_compile_time_input()
.cfg(IosExtension.MINIMUM_OS_AND_SPLIT_ARCH_TRANSITION))
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ public RuleClass build(Builder builder, RuleDefinitionEnvironment environment) {
return builder
.requiresConfigurationFragments(ObjcConfiguration.class, J2ObjcConfiguration.class,
AppleConfiguration.class, CppConfiguration.class)
/*<!-- #BLAZE_RULE(ios_framework_binary).IMPLICIT_OUTPUTS -->
<ul>
<li><code><var>name</var>.xcodeproj/project.pbxproj</code>: An Xcode project file which
can be used to develop or build on a Mac.</li>
</ul>
<!-- #END_BLAZE_RULE.IMPLICIT_OUTPUTS -->*/
.setImplicitOutputsFunction(XcodeSupport.PBXPROJ)
// TODO(bazel-team): Add version fields that are passed to the linker as
// -compatibility_version X -current_version Y and then embedded into dynamic library.
.cfg(AppleCrosstoolTransition.APPLE_CROSSTOOL_TRANSITION)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import com.google.devtools.build.lib.analysis.BaseRuleClasses;
import com.google.devtools.build.lib.analysis.RuleDefinition;
import com.google.devtools.build.lib.analysis.RuleDefinitionEnvironment;
import com.google.devtools.build.lib.packages.ImplicitOutputsFunction;
import com.google.devtools.build.lib.packages.RuleClass;
import com.google.devtools.build.lib.packages.RuleClass.Builder;
import com.google.devtools.build.lib.rules.apple.AppleConfiguration;
Expand All @@ -40,23 +39,24 @@ public RuleClass build(Builder builder, RuleDefinitionEnvironment environment) {
return builder
.requiresConfigurationFragments(ObjcConfiguration.class, AppleConfiguration.class)
// TODO(blaze-team): IPA is not right here, should probably be just zipped framework bundle.
.setImplicitOutputsFunction(
ImplicitOutputsFunction.fromFunctions(ReleaseBundlingSupport.IPA, XcodeSupport.PBXPROJ))
.setImplicitOutputsFunction(ReleaseBundlingSupport.IPA)
/* <!-- #BLAZE_RULE(ios_framework).ATTRIBUTE(binary) -->
The binary target included in the framework bundle.
<!-- #END_BLAZE_RULE.ATTRIBUTE -->*/
.add(attr("binary", LABEL)
.allowedRuleClasses("ios_framework_binary")
.allowedFileTypes()
.mandatory()
.direct_compile_time_input()
.cfg(IosExtension.MINIMUM_OS_AND_SPLIT_ARCH_TRANSITION))
.add(
attr("binary", LABEL)
.allowedRuleClasses("ios_framework_binary")
.allowedFileTypes()
.mandatory()
.direct_compile_time_input()
.cfg(IosExtension.MINIMUM_OS_AND_SPLIT_ARCH_TRANSITION))
/* <!-- #BLAZE_RULE(ios_framework).ATTRIBUTE(hdrs) -->
Public headers to include in the framework bundle.
<!-- #END_BLAZE_RULE.ATTRIBUTE -->*/
.add(attr("hdrs", LABEL_LIST)
.direct_compile_time_input()
.allowedFileTypes(ObjcRuleClasses.HDRS_TYPE))
.add(
attr("hdrs", LABEL_LIST)
.direct_compile_time_input()
.allowedFileTypes(ObjcRuleClasses.HDRS_TYPE))
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import com.google.devtools.build.lib.packages.Attribute.ComputedDefault;
import com.google.devtools.build.lib.packages.Attribute.LateBoundLabel;
import com.google.devtools.build.lib.packages.AttributeMap;
import com.google.devtools.build.lib.packages.ImplicitOutputsFunction;
import com.google.devtools.build.lib.packages.Rule;
import com.google.devtools.build.lib.packages.RuleClass;
import com.google.devtools.build.lib.packages.RuleClass.Builder.RuleClassType;
Expand All @@ -51,18 +50,17 @@ public RuleClass build(RuleClass.Builder builder, final RuleDefinitionEnvironmen
final Label mcov = env.getToolsLabel("//tools/objc:mcov");
return builder
.requiresConfigurationFragments(
ObjcConfiguration.class, J2ObjcConfiguration.class, AppleConfiguration.class,
ObjcConfiguration.class,
J2ObjcConfiguration.class,
AppleConfiguration.class,
CppConfiguration.class)
/*<!-- #BLAZE_RULE(ios_test).IMPLICIT_OUTPUTS -->
<ul>
<li><code><var>name</var>.ipa</code>: the test bundle as an
<code>.ipa</code> file
<li><code><var>name</var>.xcodeproj/project.pbxproj: An Xcode project file which can be
used to develop or build on a Mac.</li>
</ul>
<!-- #END_BLAZE_RULE.IMPLICIT_OUTPUTS -->*/
.setImplicitOutputsFunction(
ImplicitOutputsFunction.fromFunctions(ReleaseBundlingSupport.IPA, XcodeSupport.PBXPROJ))
.setImplicitOutputsFunction(ReleaseBundlingSupport.IPA)
/* <!-- #BLAZE_RULE(ios_test).ATTRIBUTE(target_device) -->
The device against which to run the test.
<!-- #END_BLAZE_RULE.ATTRIBUTE -->*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import com.google.devtools.build.lib.analysis.BaseRuleClasses;
import com.google.devtools.build.lib.analysis.RuleDefinition;
import com.google.devtools.build.lib.analysis.RuleDefinitionEnvironment;
import com.google.devtools.build.lib.packages.ImplicitOutputsFunction;
import com.google.devtools.build.lib.packages.RuleClass;
import com.google.devtools.build.lib.packages.RuleClass.Builder;
import com.google.devtools.build.lib.rules.apple.AppleConfiguration;
Expand Down Expand Up @@ -50,12 +49,9 @@ public RuleClass build(Builder builder, RuleDefinitionEnvironment env) {
<ul>
<li><code><var>name</var>.ipa</code>: the application bundle as an <code>.ipa</code>
file</li>
<li><code><var>name</var>.xcodeproj/project.pbxproj</code>: An Xcode project file which
can be used to develop or build on a Mac.</li>
</ul>
<!-- #END_BLAZE_RULE.IMPLICIT_OUTPUTS -->*/
.setImplicitOutputsFunction(
ImplicitOutputsFunction.fromFunctions(ReleaseBundlingSupport.IPA, XcodeSupport.PBXPROJ))
.setImplicitOutputsFunction(ReleaseBundlingSupport.IPA)
// TODO(bazel-team): Remove these when this rule no longer produces a bundle.
.add(
attr("$runner_script_template", LABEL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ public class ObjcBundleLibraryRule implements RuleDefinition {
public RuleClass build(Builder builder, RuleDefinitionEnvironment env) {
return builder
.requiresConfigurationFragments(ObjcConfiguration.class, AppleConfiguration.class)
/*<!-- #BLAZE_RULE(objc_bundle_library).IMPLICIT_OUTPUTS -->
<ul>
<li><code><var>name</var>.xcodeproj/project.pbxproj</code>: An Xcode project file which
can be used to develop or build on a Mac.</li>
</ul>
<!-- #END_BLAZE_RULE.IMPLICIT_OUTPUTS -->*/
.setImplicitOutputsFunction(XcodeSupport.PBXPROJ)
.cfg(AppleCrosstoolTransition.APPLE_CROSSTOOL_TRANSITION)
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ public RuleClass build(Builder builder, RuleDefinitionEnvironment environment) {
return builder
.requiresConfigurationFragments(ObjcConfiguration.class, AppleConfiguration.class,
AppleConfiguration.class)
/*<!-- #BLAZE_RULE(objc_import).IMPLICIT_OUTPUTS -->
<ul>
<li><code><var>name</var>.xcodeproj/project.pbxproj</code>: An Xcode project file which
can be used to develop or build on a Mac.</li>
</ul>
<!-- #END_BLAZE_RULE.IMPLICIT_OUTPUTS -->*/
.setImplicitOutputsFunction(XcodeSupport.PBXPROJ)
/* <!-- #BLAZE_RULE(objc_import).ATTRIBUTE(archives) -->
The list of <code>.a</code> files provided to Objective-C targets that
depend on this target.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import com.google.devtools.build.lib.analysis.BaseRuleClasses;
import com.google.devtools.build.lib.analysis.RuleDefinition;
import com.google.devtools.build.lib.analysis.RuleDefinitionEnvironment;
import com.google.devtools.build.lib.packages.ImplicitOutputsFunction;
import com.google.devtools.build.lib.packages.RuleClass;
import com.google.devtools.build.lib.packages.RuleClass.Builder;
import com.google.devtools.build.lib.rules.apple.AppleConfiguration;
Expand All @@ -31,8 +30,8 @@ public class ObjcLibraryRule implements RuleDefinition {
@Override
public RuleClass build(Builder builder, RuleDefinitionEnvironment env) {
return builder
.requiresConfigurationFragments(ObjcConfiguration.class, AppleConfiguration.class,
CppConfiguration.class)
.requiresConfigurationFragments(
ObjcConfiguration.class, AppleConfiguration.class, CppConfiguration.class)
/*<!-- #BLAZE_RULE(objc_library).IMPLICIT_OUTPUTS -->
<ul>
<li><code><var>name</var>.xcodeproj/project.pbxproj</code>: An Xcode project file which
Expand All @@ -41,8 +40,7 @@ public RuleClass build(Builder builder, RuleDefinitionEnvironment env) {
contains the full transitive closure of library dependencies.</li>
</ul>
<!-- #END_BLAZE_RULE.IMPLICIT_OUTPUTS -->*/
.setImplicitOutputsFunction(ImplicitOutputsFunction.fromFunctions(
CompilationSupport.FULLY_LINKED_LIB, XcodeSupport.PBXPROJ))
.setImplicitOutputsFunction(CompilationSupport.FULLY_LINKED_LIB)
.cfg(AppleCrosstoolTransition.APPLE_CROSSTOOL_TRANSITION)
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,8 @@
*/
public final class XcodeSupport {

/**
* Template for a target's xcode project.
*/
public static final SafeImplicitOutputsFunction PBXPROJ =
/** Template for a target's xcode project. */
private static final SafeImplicitOutputsFunction PBXPROJ =
fromTemplates("%{name}.xcodeproj/project.pbxproj");

private final RuleContext ruleContext;
Expand Down

0 comments on commit 5f1d886

Please sign in to comment.