Skip to content

Commit

Permalink
Remove the --ios_cpu command line option.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 469241868
Change-Id: I911796b5ae7f300d3f052ef537b17f01054d2fed
  • Loading branch information
Googler authored and copybara-github committed Aug 22, 2022
1 parent a8db283 commit 684fb0a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand Down Expand Up @@ -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")
Expand All @@ -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");
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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",
Expand All @@ -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(",
Expand Down

0 comments on commit 684fb0a

Please sign in to comment.