aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/apple/AppleCommandLineOptions.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/apple/AppleCommandLineOptions.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/apple/AppleCommandLineOptions.java97
1 files changed, 45 insertions, 52 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/apple/AppleCommandLineOptions.java b/src/main/java/com/google/devtools/build/lib/rules/apple/AppleCommandLineOptions.java
index 2256156496..7a3a67bc44 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/apple/AppleCommandLineOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/apple/AppleCommandLineOptions.java
@@ -46,8 +46,8 @@ public class AppleCommandLineOptions extends FragmentOptions {
defaultValue = "null",
category = "build",
converter = DottedVersionConverter.class,
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
+ effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE},
help =
"If specified, uses Xcode of the given version for relevant build actions. "
+ "If unspecified, uses the executor default version of Xcode."
@@ -61,8 +61,8 @@ public class AppleCommandLineOptions extends FragmentOptions {
defaultValue = "null",
converter = DottedVersionConverter.class,
category = "build",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
+ effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE},
help = "Specifies the version of the iOS SDK to use to build iOS applications."
)
public DottedVersion iosSdkVersion;
@@ -72,8 +72,8 @@ public class AppleCommandLineOptions extends FragmentOptions {
defaultValue = "null",
converter = DottedVersionConverter.class,
category = "build",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
+ effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE},
help = "Specifies the version of the watchOS SDK to use to build watchOS applications."
)
public DottedVersion watchOsSdkVersion;
@@ -83,8 +83,8 @@ public class AppleCommandLineOptions extends FragmentOptions {
defaultValue = "null",
converter = DottedVersionConverter.class,
category = "build",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
+ effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE},
help = "Specifies the version of the tvOS SDK to use to build tvOS applications."
)
public DottedVersion tvOsSdkVersion;
@@ -94,8 +94,8 @@ public class AppleCommandLineOptions extends FragmentOptions {
defaultValue = "null",
converter = DottedVersionConverter.class,
category = "build",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
+ effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE},
help = "Specifies the version of the macOS SDK to use to build macOS applications."
)
public DottedVersion macOsSdkVersion;
@@ -105,8 +105,8 @@ public class AppleCommandLineOptions extends FragmentOptions {
defaultValue = "null",
category = "flags",
converter = DottedVersionConverter.class,
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE},
help = "Minimum compatible iOS version for target simulators and devices."
)
public DottedVersion iosMinimumOs;
@@ -116,8 +116,8 @@ public class AppleCommandLineOptions extends FragmentOptions {
defaultValue = "null",
category = "flags",
converter = DottedVersionConverter.class,
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE},
help = "Minimum compatible watchOS version for target simulators and devices."
)
public DottedVersion watchosMinimumOs;
@@ -127,8 +127,8 @@ public class AppleCommandLineOptions extends FragmentOptions {
defaultValue = "null",
category = "flags",
converter = DottedVersionConverter.class,
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE},
help = "Minimum compatible tvOS version for target simulators and devices."
)
public DottedVersion tvosMinimumOs;
@@ -138,8 +138,8 @@ public class AppleCommandLineOptions extends FragmentOptions {
defaultValue = "null",
category = "flags",
converter = DottedVersionConverter.class,
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE},
help = "Minimum compatible macOS version for targets."
)
public DottedVersion macosMinimumOs;
@@ -169,8 +169,9 @@ public class AppleCommandLineOptions extends FragmentOptions {
name = "ios_cpu",
defaultValue = DEFAULT_IOS_CPU,
category = "build",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.NO_OP},
+ metadataTags = {OptionMetadataTag.DEPRECATED},
help = "Specifies to target CPU of iOS compilation."
)
public String iosCpu;
@@ -180,8 +181,8 @@ public class AppleCommandLineOptions extends FragmentOptions {
defaultValue = "@bazel_tools//tools/cpp:toolchain",
category = "version",
converter = LabelConverter.class,
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
+ effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE, OptionEffectTag.CHANGES_INPUTS},
help =
"The label of the crosstool package to be used in Apple and Objc rules and their"
+ " dependencies."
@@ -193,7 +194,7 @@ public class AppleCommandLineOptions extends FragmentOptions {
defaultValue = "IOS",
converter = PlatformTypeConverter.class,
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ effectTags = {OptionEffectTag.BAZEL_INTERNAL_CONFIGURATION},
help =
"Don't set this value from the command line - it is derived from other flags and "
+ "configuration transitions derived from rule attributes"
@@ -204,7 +205,7 @@ public class AppleCommandLineOptions extends FragmentOptions {
name = "apple_split_cpu",
defaultValue = "",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ effectTags = {OptionEffectTag.BAZEL_INTERNAL_CONFIGURATION},
help =
"Don't set this value from the command line - it is derived from other flags and "
+ "configuration transitions derived from rule attributes"
@@ -222,7 +223,7 @@ public class AppleCommandLineOptions extends FragmentOptions {
defaultValue = "UNKNOWN",
converter = ConfigurationDistinguisherConverter.class,
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ effectTags = {OptionEffectTag.BAZEL_INTERNAL_CONFIGURATION},
metadataTags = {OptionMetadataTag.INTERNAL}
)
public ConfigurationDistinguisher configurationDistinguisher;
@@ -232,8 +233,8 @@ public class AppleCommandLineOptions extends FragmentOptions {
converter = CommaSeparatedOptionListConverter.class,
defaultValue = "",
category = "flags",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE, OptionEffectTag.LOADING_AND_ANALYSIS},
help =
"Comma-separated list of architectures to build an ios_application with. The result "
+ "is a universal binary containing all specified architectures."
@@ -245,8 +246,8 @@ public class AppleCommandLineOptions extends FragmentOptions {
converter = CommaSeparatedOptionListConverter.class,
defaultValue = DEFAULT_WATCHOS_CPU,
category = "flags",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE, OptionEffectTag.LOADING_AND_ANALYSIS},
help = "Comma-separated list of architectures for which to build Apple watchOS binaries."
)
public List<String> watchosCpus;
@@ -256,8 +257,8 @@ public class AppleCommandLineOptions extends FragmentOptions {
converter = CommaSeparatedOptionListConverter.class,
defaultValue = DEFAULT_TVOS_CPU,
category = "flags",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE, OptionEffectTag.LOADING_AND_ANALYSIS},
help = "Comma-separated list of architectures for which to build Apple tvOS binaries."
)
public List<String> tvosCpus;
@@ -267,8 +268,8 @@ public class AppleCommandLineOptions extends FragmentOptions {
converter = CommaSeparatedOptionListConverter.class,
defaultValue = DEFAULT_MACOS_CPU,
category = "flags",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE, OptionEffectTag.LOADING_AND_ANALYSIS},
help = "Comma-separated list of architectures for which to build Apple macOS binaries."
)
public List<String> macosCpus;
@@ -276,8 +277,8 @@ public class AppleCommandLineOptions extends FragmentOptions {
@Option(
name = "default_ios_provisioning_profile",
defaultValue = "",
- documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.SIGNING,
+ effectTags = {OptionEffectTag.CHANGES_INPUTS},
converter = DefaultProvisioningProfileConverter.class
)
public Label defaultProvisioningProfile;
@@ -286,8 +287,8 @@ public class AppleCommandLineOptions extends FragmentOptions {
name = "xcode_version_config",
defaultValue = "@local_config_xcode//:host_xcodes",
converter = LabelConverter.class,
- documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
+ effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE, OptionEffectTag.LOADING_AND_ANALYSIS},
help =
"The label of the xcode_config rule to be used for selecting the Xcode version "
+ "in the build configuration."
@@ -312,8 +313,8 @@ public class AppleCommandLineOptions extends FragmentOptions {
name = "xcode_toolchain",
defaultValue = "null",
category = "flags",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
+ effectTags = {OptionEffectTag.ACTION_OPTIONS},
help =
"The identifier of an Xcode toolchain to use for builds. Currently only the toolchains "
+ "that ship with Xcode are supported. For example, in addition to the default "
@@ -328,8 +329,8 @@ public class AppleCommandLineOptions extends FragmentOptions {
// TODO(blaze-team): Default to embedded_markers when fully implemented.
defaultValue = "none",
category = "flags",
- documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS,
+ effectTags = {OptionEffectTag.LOSES_INCREMENTAL_STATE},
help =
"Specify the Apple bitcode mode for compile steps. "
+ "Values: 'none', 'embedded_markers', 'embedded'."
@@ -340,7 +341,8 @@ public class AppleCommandLineOptions extends FragmentOptions {
name = "apple_crosstool_transition",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ effectTags = {OptionEffectTag.CHANGES_INPUTS},
+ metadataTags = {OptionMetadataTag.INCOMPATIBLE_CHANGE},
help = "If true, the apple crosstool is used for all apple rules."
)
public boolean enableAppleCrosstoolTransition;
@@ -349,20 +351,11 @@ public class AppleCommandLineOptions extends FragmentOptions {
name = "target_uses_apple_crosstool",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
- effectTags = {OptionEffectTag.UNKNOWN},
+ effectTags = {OptionEffectTag.BAZEL_INTERNAL_CONFIGURATION},
help = "If true, this target uses the apple crosstool. Do not set this flag manually."
)
public boolean targetUsesAppleCrosstool;
- private ApplePlatform getPlatform() {
- for (String architecture : iosMultiCpus) {
- if (ApplePlatform.forTarget(PlatformType.IOS, architecture) == ApplePlatform.IOS_DEVICE) {
- return ApplePlatform.IOS_DEVICE;
- }
- }
- return ApplePlatform.forTarget(PlatformType.IOS, iosCpu);
- }
-
/**
* Returns the architecture implied by these options.
*