Skip to content

Commit

Permalink
Remove unused --default_android_platform flag.
Browse files Browse the repository at this point in the history
It didn't help and is unneccessary.

PiperOrigin-RevId: 449234904
  • Loading branch information
katre authored and Copybara-Service committed May 17, 2022
1 parent c1009c2 commit ed7a056
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
Expand Up @@ -328,19 +328,6 @@ public static class Options extends FragmentOptions {
+ " each specified target platform.")
public List<Label> androidPlatforms;

@Option(
name = "default_android_platform",
converter = LabelConverter.class,
documentationCategory = OptionDocumentationCategory.TOOLCHAIN,
defaultValue = "null",
effectTags = {
OptionEffectTag.CHANGES_INPUTS,
OptionEffectTag.LOADING_AND_ANALYSIS,
OptionEffectTag.LOSES_INCREMENTAL_STATE,
},
help = "Sets the platform that is used by default when --android_platforms is not set.")
public Label defaultAndroidPlatform;

@Option(
name = "fat_apk_hwasan",
defaultValue = "false",
Expand Down
Expand Up @@ -71,8 +71,7 @@ public BuildOptions patch(BuildOptionsView options, EventHandler eventHandler) {
PlatformOptions newPlatformOptions = newOptions.get(PlatformOptions.class);
// Set the value of --platforms for this target and its dependencies.
// 1. If --android_platforms is set, use a value from that.
// 2. If --default_android_platform is set, use that.
// 3. Otherwise, leave --platforms alone (this will probably lead to build errors).
// 2. Otherwise, leave --platforms alone (this will probably lead to build errors).
if (!androidOptions.androidPlatforms.isEmpty()) {
// If the current value of --platforms is not one of the values of --android_platforms, change
// it to be the first one. If the curent --platforms is part of --android_platforms, leave it
Expand All @@ -82,8 +81,6 @@ public BuildOptions patch(BuildOptionsView options, EventHandler eventHandler) {
if (!androidOptions.androidPlatforms.containsAll(newPlatformOptions.platforms)) {
newPlatformOptions.platforms = ImmutableList.of(androidOptions.androidPlatforms.get(0));
}
} else if (androidOptions.defaultAndroidPlatform != null) {
newPlatformOptions.platforms = ImmutableList.of(androidOptions.defaultAndroidPlatform);
}

// If we are using toolchain resolution for Android, also use it for CPP.
Expand Down

0 comments on commit ed7a056

Please sign in to comment.