Apple-specific environment variables are derived from the CROSSTOOL instead
of hardcoded in AppleCcToolchain.  Also, apply environment variables to objc
archives.
MOS_MIGRATED_REVID=149439637
@@ -63,7 +63,7 @@ public class AppleCcToolchain extends CcToolchain {
Platform platform = appleConfiguration.getSingleArchPlatform();
- Map<String, String> appleEnv = getEnvironment(ruleContext);
+ Map<String, String> appleEnv = getEnvironmentBuildVariables(ruleContext);
return ImmutableMap.<String, String>builder()
.put(
@@ -114,8 +114,7 @@ public class AppleCcToolchain extends CcToolchain {
.build();
}
- @Override
- public ImmutableMap<String, String> getEnvironment(RuleContext ruleContext) {
+ private ImmutableMap<String, String> getEnvironmentBuildVariables(RuleContext ruleContext) {
Map<String, String> builder = new LinkedHashMap<>();
CppConfiguration cppConfiguration = ruleContext.getFragment(CppConfiguration.class);
AppleConfiguration appleConfiguration = ruleContext.getFragment(AppleConfiguration.class);
