summaryrefslogtreecommitdiffstats
path: root/clang/darwin-stdlib.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2016-02-12 22:30:42 +0000
committerTim Northover <tnorthover@apple.com>2016-02-12 22:30:42 +0000
commitb534ce46bd40eaa909a20f40ae576a2627da4f90 (patch)
tree6d97cb6247054fa8723fd1c3e0a9395f67b11bea /clang/darwin-stdlib.cpp
parentdf3857c7d44302f9525f3851b9855e20ca2436e6 (diff)
downloadbcm5719-llvm-b534ce46bd40eaa909a20f40ae576a2627da4f90.tar.gz
bcm5719-llvm-b534ce46bd40eaa909a20f40ae576a2627da4f90.zip
Darwin: pass -stdlib=libc++ down to cc1 whenever we're targeting libc++
Recent refactoring meant it only got passed down when explicitly specified, which breaks header search on Darwin. llvm-svn: 260755
Diffstat (limited to 'clang/darwin-stdlib.cpp')
-rw-r--r--clang/darwin-stdlib.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/darwin-stdlib.cpp b/clang/darwin-stdlib.cpp
new file mode 100644
index 00000000000..c9be6075bb0
--- /dev/null
+++ b/clang/darwin-stdlib.cpp
@@ -0,0 +1,16 @@
+// RUN: %clang -target x86_64-apple-darwin -arch arm64 -miphoneos-version-min=7.0 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LIBCXX
+// RUN: %clang -target x86_64-apple-darwin -mmacosx-version-min=10.8 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LIBSTDCXX
+// RUN: %clang -target x86_64-apple-darwin -mmacosx-version-min=10.9 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LIBCXX
+// RUN: %clang -target x86_64-apple-darwin -arch armv7s -miphoneos-version-min=6.1 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LIBSTDCXX
+// RUN: %clang -target x86_64-apple-darwin -arch armv7s -miphoneos-version-min=7.0 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LIBCXX
+// RUN: %clang -target x86_64-apple-darwin -arch armv7k %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LIBCXX
+
+// The purpose of this test is that the libc++ headers should be found
+// properly. At the moment this is done by passing -stdlib=libc++ down to the
+// cc1 invocation. If and when we change to finding them in the driver this test
+// should reflect that.
+
+// CHECK-LIBCXX: -stdlib=libc++
+
+// CHECK-LIBSTDCXX-NOT: -stdlib=libc++
+// CHECK-LIBSTDCXX-NOT: -stdlib=libstdc++
OpenPOWER on IntegriCloud