aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java
diff options
context:
space:
mode:
authorGravatar Cal Peyser <cpeyser@google.com>2016-05-11 09:31:47 +0000
committerGravatar Klaus Aehlig <aehlig@google.com>2016-05-11 10:24:48 +0000
commit66ce9030d2d2a100593b90b1d0e2188001db2d3e (patch)
tree365b36228b8d78b12b156609ef5c57d676b0361c /src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java
parentf6fa7d94e7f682edb610e8ad651b131882e81779 (diff)
Reconcile cc and objc default compiler flags in the crosstool.
-- MOS_MIGRATED_REVID=122035585
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java b/src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java
index 27dc24bdb9..6abcce77b3 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java
@@ -130,6 +130,13 @@ public final class CompilationSupport {
static final ImmutableList<String> CLANG_COVERAGE_FLAGS =
ImmutableList.of("-fprofile-arcs", "-ftest-coverage");
+ // These are added by Xcode when building, because the simulator is built on OSX
+ // frameworks so we aim compile to match the OSX objc runtime.
+ @VisibleForTesting
+ static final ImmutableList<String> IOS_SIMULATOR_COMPILE_FLAGS =
+ ImmutableList.of(
+ "-fexceptions", "-fasm-blocks", "-fobjc-abi-version=2", "-fobjc-legacy-dispatch");
+
/**
* Returns the location of the xcrunwrapper tool.
*/
@@ -1511,13 +1518,7 @@ public final class CompilationSupport {
case IOS_DEVICE:
return ImmutableList.of();
case IOS_SIMULATOR:
- // These are added by Xcode when building, because the simulator is built on OSX
- // frameworks so we aim compile to match the OSX objc runtime.
- return ImmutableList.of(
- "-fexceptions",
- "-fasm-blocks",
- "-fobjc-abi-version=2",
- "-fobjc-legacy-dispatch");
+ return IOS_SIMULATOR_COMPILE_FLAGS;
default:
throw new AssertionError();
}