diff options
author | 2017-12-19 15:15:05 -0800 | |
---|---|---|
committer | 2017-12-19 17:26:25 -0800 | |
commit | 96ce526e4f45d05bde6961461c2bc7d7fc74f26d (patch) | |
tree | 1804258b46c8f8e7aae1560680d14e28ad45bb27 /src/test/java/com/google/devtools/build/lib/packages/util/MockObjcSupport.java | |
parent | ed5dfd7c110dbc47274fd25bc6aca534b698741a (diff) |
Refactor OSX-Objc configuration requirements to MockObjcSupport
This is to allow the canonical set of objc-required configuration flags to be easily referenced by tests other than those in the Objc rules package.
RELNOTES: None.
PiperOrigin-RevId: 179610596
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/packages/util/MockObjcSupport.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/packages/util/MockObjcSupport.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/packages/util/MockObjcSupport.java b/src/test/java/com/google/devtools/build/lib/packages/util/MockObjcSupport.java index 43176008a5..fdded0fff7 100644 --- a/src/test/java/com/google/devtools/build/lib/packages/util/MockObjcSupport.java +++ b/src/test/java/com/google/devtools/build/lib/packages/util/MockObjcSupport.java @@ -51,6 +51,24 @@ public final class MockObjcSupport { public static final String DEFAULT_XCODE_VERSION = "7.3.1"; public static final String DEFAULT_IOS_SDK_VERSION = "8.4"; + /** Returns the set of flags required to build objc libraries using the mock OSX crosstool. */ + public static ImmutableList<String> requiredObjcCrosstoolFlags() { + ImmutableList.Builder<String> argsBuilder = ImmutableList.builder(); + argsBuilder.addAll(TestConstants.OSX_CROSSTOOL_FLAGS); + + // TODO(b/68751876): Set --apple_crosstool_top and --crosstool_top using the + // AppleCrosstoolTransition + argsBuilder + .add("--xcode_version_config=" + MockObjcSupport.XCODE_VERSION_CONFIG) + .add("--apple_crosstool_top=" + MockObjcSupport.DEFAULT_OSX_CROSSTOOL) + .add("--crosstool_top=" + MockObjcSupport.DEFAULT_OSX_CROSSTOOL); + + // TODO(b/32411441): This flag will be flipped off by default imminently, at which point + // this can be removed. The flag itself is for safe rollout of a backwards incompatible change. + argsBuilder.add("--noexperimental_objc_provider_from_linked"); + return argsBuilder.build(); + } + /** * Sets up the support for building ObjC. * Any partial toolchain line will be merged into every toolchain stanza in the crosstool |