From 95ee9cb0f1eeb96787387e8dbdb35eb6172b665f Mon Sep 17 00:00:00 2001 From: lberki Date: Tue, 10 Oct 2017 09:38:47 +0200 Subject: if --experimental_apple_mandatory_minimum_version is specified, make Apple rules only add the minimum version of the OS to the output directory name if the configuration is behind an AppleBinaryTransition, or if a minimum_os flag (such as --ios_minimum_os) is specified on the command line. This is necessary so that the only time the minimum OS version affects the output directory name is when it's explicitly specified and therefore is accessible without looking at the xcode_config rule. Progress towards #3424. RELNOTES: None. PiperOrigin-RevId: 171641295 --- .../google/devtools/build/lib/rules/apple/AppleConfiguration.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main/java/com/google/devtools/build/lib/rules/apple/AppleConfiguration.java') diff --git a/src/main/java/com/google/devtools/build/lib/rules/apple/AppleConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/apple/AppleConfiguration.java index d8cc719737..9ef221822f 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/apple/AppleConfiguration.java +++ b/src/main/java/com/google/devtools/build/lib/rules/apple/AppleConfiguration.java @@ -590,7 +590,10 @@ public class AppleConfiguration extends BuildConfiguration.Fragment { if (!appleSplitCpu.isEmpty()) { components.add(applePlatformType.toString().toLowerCase()); components.add(appleSplitCpu); - components.add("min" + getMinimumOsForPlatformType(applePlatformType)); + + if (!isMandatoryMinimumVersion() || options.isMinimumOsVersionExplicitlySet()) { + components.add("min" + getMinimumOsForPlatformType(applePlatformType)); + } } if (shouldDistinguishOutputDirectory()) { components.add(configurationDistinguisher.getFileSystemName()); -- cgit v1.2.3