Skip to content

Commit

Permalink
Rename IOS_SDK_VERSION_OVERRIDE to APPLE_SDK_VERSION_OVERRIDE, as it …
Browse files Browse the repository at this point in the history
…need not be locked to iOS SDK.

--
MOS_MIGRATED_REVID=105231425
  • Loading branch information
c-parsons authored and jhfield committed Oct 13, 2015
1 parent 4b25ee0 commit a9afb69
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ public class ObjcConfiguration extends BuildConfiguration.Fragment {

private static final String XCODE_VERSION_ENV_NAME = "XCODE_VERSION_OVERRIDE";
/**
* Environment variable name for the iOS SDK version. If unset, uses the system default of the
* host.
* Environment variable name for the apple SDK version. If unset, uses the system default of the
* host for the platform in the value of {@link #APPLE_SDK_PLATFORM_ENV_NAME}.
**/
public static final String IOS_SDK_VERSION_ENV_NAME = "IOS_SDK_VERSION_OVERRIDE";
public static final String APPLE_SDK_VERSION_ENV_NAME = "APPLE_SDK_VERSION_OVERRIDE";
/**
* Environment variable name for the apple SDK platform. This should be set for all actions that
* require an apple SDK. The valid values consist of {@link Platform} names.
Expand Down Expand Up @@ -127,7 +127,7 @@ public Map<String, String> getEnvironmentForDarwin() {
if (xcodeVersionOverride.isPresent()) {
builder.put(XCODE_VERSION_ENV_NAME, xcodeVersionOverride.get());
}
builder.put(IOS_SDK_VERSION_ENV_NAME, iosSdkVersion);
builder.put(APPLE_SDK_VERSION_ENV_NAME, iosSdkVersion);
builder.put(APPLE_SDK_PLATFORM_ENV_NAME, IosSdkCommands.getPlatformPlistName(this));
return builder.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,12 @@ private ImmutableMap<String, String> locallyDeterminedEnv(ImmutableMap<String, S
throws UserExecException {
ImmutableMap.Builder<String, String> newEnvBuilder = ImmutableMap.builder();
newEnvBuilder.putAll(env);
if (env.containsKey(ObjcConfiguration.IOS_SDK_VERSION_ENV_NAME)) {
if (env.containsKey(ObjcConfiguration.APPLE_SDK_VERSION_ENV_NAME)) {
// The Apple platform is needed to select the appropriate SDK.
if (!env.containsKey(ObjcConfiguration.APPLE_SDK_PLATFORM_ENV_NAME)) {
throw new UserExecException("Could not resolve apple platform for determining SDK");
}
String iosSdkVersion = env.get(ObjcConfiguration.IOS_SDK_VERSION_ENV_NAME);
String iosSdkVersion = env.get(ObjcConfiguration.APPLE_SDK_VERSION_ENV_NAME);
String appleSdkPlatform = env.get(ObjcConfiguration.APPLE_SDK_PLATFORM_ENV_NAME);
// TODO(bazel-team): Determine and set DEVELOPER_DIR.
addSdkRootEnv(newEnvBuilder, iosSdkVersion, appleSdkPlatform);
Expand Down

0 comments on commit a9afb69

Please sign in to comment.