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 57a7dafbc4314b..f8c678abf13372 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 @@ -205,18 +205,6 @@ public class AppleCommandLineOptions extends FragmentOptions { /** The default Catalyst CPU value. */ public static final String DEFAULT_CATALYST_CPU = "x86_64"; - @Deprecated - @Option( - name = "ios_cpu", - defaultValue = DEFAULT_IOS_CPU, - documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, - effectTags = {OptionEffectTag.NO_OP}, - metadataTags = {OptionMetadataTag.DEPRECATED}, - help = - "No-op. Kept here for backwards compatibility. This field will be removed in a " - + "future release.") - public String iosCpu; - @Option( name = "apple_compiler", defaultValue = "null", diff --git a/src/test/java/com/google/devtools/build/lib/rules/objc/AppleStaticLibraryTest.java b/src/test/java/com/google/devtools/build/lib/rules/objc/AppleStaticLibraryTest.java index 2f93ad1a0e642a..f154250808ab25 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/objc/AppleStaticLibraryTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/objc/AppleStaticLibraryTest.java @@ -430,8 +430,8 @@ public void testWatchSimulatorLinkAction() throws Exception { ")", "objc_library(name = 'objcLib', srcs = [ 'b.m' ])"); - // Tests that ios_multi_cpus and ios_cpu are completely ignored. - useConfiguration("--ios_multi_cpus=x86_64", "--ios_cpu=x86_64", "--watchos_cpus=i386"); + // Tests that ios_multi_cpus and cpu are completely ignored. + useConfiguration("--ios_multi_cpus=x86_64", "--cpu=ios_x86_64", "--watchos_cpus=i386"); Action lipoAction = lipoLibAction("//package:test"); diff --git a/src/test/java/com/google/devtools/build/lib/rules/objc/BazelJ2ObjcLibraryTest.java b/src/test/java/com/google/devtools/build/lib/rules/objc/BazelJ2ObjcLibraryTest.java index ba1a80de0cf721..e539fecb0aa637 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/objc/BazelJ2ObjcLibraryTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/objc/BazelJ2ObjcLibraryTest.java @@ -447,7 +447,7 @@ public void testExplicitJreDeps() throws Exception { @Test public void testTranspilationActionTreeArtifactOutputsFromSourceJar() throws Exception { - useConfiguration("--ios_cpu=i386", "--ios_minimum_os=1.0"); + useConfiguration("--ios_minimum_os=1.0"); scratch.file("java/com/google/transpile/dummy.java"); scratch.file("java/com/google/transpile/dummyjar.srcjar"); scratch.file( @@ -475,7 +475,7 @@ public void testTranspilationActionTreeArtifactOutputsFromSourceJar() throws Exc @Test public void testGeneratedTreeArtifactFromGenJar() throws Exception { - useConfiguration("--ios_cpu=i386", "--ios_minimum_os=1.0"); + useConfiguration("--ios_minimum_os=1.0"); addSimpleJ2ObjcLibraryWithJavaPlugin(); ConfiguredTarget j2objcLibraryTarget = getConfiguredTarget("//java/com/google/app/test:transpile"); @@ -751,7 +751,7 @@ public void testJ2ObjcAppearsInLinkArgs() throws Exception { @Test public void testArchiveLinkActionWithTreeArtifactFromGenJar() throws Exception { - useConfiguration("--ios_cpu=i386", "--ios_minimum_os=1.0"); + useConfiguration("--ios_minimum_os=1.0"); addSimpleJ2ObjcLibraryWithJavaPlugin(); Artifact archive = j2objcArchive("//java/com/google/app/test:transpile", "test"); CommandAction archiveAction = (CommandAction) getGeneratingAction(archive); @@ -829,7 +829,7 @@ public void testJ2ObjCCustomModuleMap() throws Exception { @Test public void testModuleMapFromGenJarTreeArtifact() throws Exception { - useConfiguration("--ios_cpu=i386", "--ios_minimum_os=1.0"); + useConfiguration("--ios_minimum_os=1.0"); addSimpleJ2ObjcLibraryWithJavaPlugin(); ConfiguredTarget j2objcLibraryTarget = getConfiguredTarget("//java/com/google/app/test:transpile"); diff --git a/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcLibraryTest.java b/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcLibraryTest.java index 18dfd6cc971daf..1d187a89a5115c 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcLibraryTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcLibraryTest.java @@ -206,7 +206,6 @@ public void testObjcPlusPlusCompile() throws Exception { useConfiguration( "--apple_platform_type=ios", "--cpu=ios_i386", - "--ios_cpu=i386", "--ios_minimum_os=9.10.11"); createLibraryTargetWriter("//objc:lib") .setList("srcs", "a.mm") @@ -304,7 +303,6 @@ public void testObjcHeaderContainsObjccopt() throws Exception { public void testCompilationModeDbg() throws Exception { useConfiguration( "--cpu=ios_i386", - "--ios_cpu=i386", "--compilation_mode=dbg"); scratch.file("objc/a.m"); scratch.file( @@ -327,7 +325,6 @@ public void testCompilationModeDbg() throws Exception { public void testCompilationModeFastbuild() throws Exception { useConfiguration( "--cpu=ios_i386", - "--ios_cpu=i386", "--compilation_mode=fastbuild"); scratch.file("objc/a.m"); scratch.file( @@ -350,7 +347,6 @@ public void testCompilationModeFastbuild() throws Exception { public void testCompilationModeOpt() throws Exception { useConfiguration( "--cpu=ios_i386", - "--ios_cpu=i386", "--compilation_mode=opt"); scratch.file("objc/a.m"); scratch.file( @@ -479,7 +475,7 @@ public void testProvidesObjcHeadersWithDotMFiles() throws Exception { @Test public void testMultiPlatformLibrary() throws Exception { - useConfiguration("--ios_multi_cpus=i386,x86_64,armv7,arm64", "--ios_cpu=armv7"); + useConfiguration("--ios_multi_cpus=i386,x86_64,armv7,arm64", "--cpu=ios_armv7"); createLibraryTargetWriter("//objc:lib") .setAndCreateFiles("srcs", "a.m", "b.m", "private.h") @@ -491,7 +487,7 @@ public void testMultiPlatformLibrary() throws Exception { @Test public void testCompilationActions_simulator() throws Exception { - useConfiguration("--apple_platform_type=ios", "--cpu=ios_i386", "--ios_cpu=i386"); + useConfiguration("--apple_platform_type=ios", "--cpu=ios_i386"); scratch.file("objc/a.m"); scratch.file("objc/non_arc.m"); @@ -536,7 +532,7 @@ public void testCompilationActions_simulator() throws Exception { @Test public void testCompilationActions_device() throws Exception { - useConfiguration("--apple_platform_type=ios", "--cpu=ios_armv7", "--ios_cpu=armv7"); + useConfiguration("--apple_platform_type=ios", "--cpu=ios_armv7"); scratch.file("objc/a.m"); scratch.file("objc/non_arc.m"); @@ -616,7 +612,7 @@ public void testPrecompiledHeaders() throws Exception { @Test public void testCompilationActionsWithCopts() throws Exception { - useConfiguration("--apple_platform_type=ios", "--cpu=ios_i386", "--ios_cpu=i386"); + useConfiguration("--apple_platform_type=ios", "--cpu=ios_i386"); scratch.file( "objc/defs.bzl", @@ -893,7 +889,7 @@ public void testCompilationActionsWithCoptFmodules() throws Exception { @Test public void testArchiveAction_simulator() throws Exception { - useConfiguration("--apple_platform_type=ios", "--cpu=ios_i386", "--ios_cpu=i386"); + useConfiguration("--apple_platform_type=ios", "--cpu=ios_i386"); createLibraryTargetWriter("//objc:lib") .setAndCreateFiles("srcs", "a.m", "b.m", "private.h") .setAndCreateFiles("hdrs", "c.h") @@ -922,7 +918,7 @@ public void testArchiveAction_simulator() throws Exception { @Test public void testArchiveAction_device() throws Exception { - useConfiguration("--apple_platform_type=ios", "--cpu=ios_armv7", "--ios_cpu=armv7"); + useConfiguration("--apple_platform_type=ios", "--cpu=ios_armv7"); createLibraryTargetWriter("//objc:lib") .setAndCreateFiles("srcs", "a.m", "b.m", "private.h") .setAndCreateFiles("hdrs", "c.h") @@ -982,7 +978,7 @@ public void testIncludesDirsGetPassedToCompileAction() throws Exception { @Test public void testPropagatesDefinesToDependersTransitively() throws Exception { - useConfiguration("--apple_platform_type=ios", "--cpu=ios_x86_64", "--ios_cpu=x86_64"); + useConfiguration("--apple_platform_type=ios", "--cpu=ios_x86_64"); createLibraryTargetWriter("//lib1:lib1") .setAndCreateFiles("srcs", "a.m") .setAndCreateFiles("non_arc_srcs", "b.m") @@ -1811,9 +1807,7 @@ public void testObjcImportDoesNotCrash() throws Exception { @Test public void testCompilationActionsWithIQuotesInCopts() throws Exception { - useConfiguration( - "--cpu=ios_i386", - "--ios_cpu=i386"); + useConfiguration("--cpu=ios_i386"); createLibraryTargetWriter("//objc:lib") .setAndCreateFiles("srcs", "a.m", "b.m", "private.h") .setAndCreateFiles("hdrs", "c.h") @@ -1876,7 +1870,6 @@ public void testSysrootArgSpecifiedWithGrteTopFlag() throws Exception { MockObjcSupport.setup(mockToolsConfig); useConfiguration( "--cpu=ios_x86_64", - "--ios_cpu=x86_64", "--apple_grte_top=//x"); scratch.file( "x/BUILD", @@ -1898,9 +1891,7 @@ public void testDefaultEnabledFeatureIsUsed() throws Exception { // cc_toolchain in use will be the darwin_x86_64 one. MockObjcSupport.setupCcToolchainConfig( mockToolsConfig, MockObjcSupport.darwinX86_64().withFeatures("default_feature")); - useConfiguration( - "--cpu=ios_x86_64", - "--ios_cpu=x86_64"); + useConfiguration("--cpu=ios_x86_64"); scratch.file( "x/BUILD", "objc_library(",