aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2016-06-14 19:17:16 +0000
committerGravatar Yue Gan <yueg@google.com>2016-06-15 08:42:50 +0000
commit021dc4e1d25827f0e68a9b6a09ff5f79aa18f8a4 (patch)
tree6e1914784dd98d9502dbb5b540943f13ed5af1c7 /src
parent5028e035a12b602b00f7f5b079d64eb54881fd1d (diff)
When building ObjectiveC++, pass the flag -std=c++11 in addition to -stdlib=libc++.
RELNOTES: When building ObjectiveC++, pass the flag -std=c++11 in addition to -stdlib=libc++. -- MOS_MIGRATED_REVID=124867581
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java4
1 files changed, 3 insertions, 1 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 e65cd708e5..995a65d502 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
@@ -498,6 +498,7 @@ public final class CompilationSupport {
.add(CLANG);
if (ObjcRuleClasses.CPP_SOURCES.matches(sourceFile.getExecPath())) {
commandLine.add("-stdlib=libc++");
+ commandLine.add("-std=c++11");
}
if (compilationArtifacts.hasSwiftSources()) {
@@ -1147,7 +1148,8 @@ public final class CompilationSupport {
if (objcProvider.is(USES_CPP)) {
commandLine
.add(CLANG_PLUSPLUS)
- .add("-stdlib=libc++");
+ .add("-stdlib=libc++")
+ .add("-std=c++11");
} else {
commandLine.add(CLANG);
}