summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/nostdlibxx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Driver/nostdlibxx.cpp')
-rw-r--r--clang/test/Driver/nostdlibxx.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Driver/nostdlibxx.cpp b/clang/test/Driver/nostdlibxx.cpp
index 02bd62d96af..48d14e15a61 100644
--- a/clang/test/Driver/nostdlibxx.cpp
+++ b/clang/test/Driver/nostdlibxx.cpp
@@ -6,3 +6,12 @@
// CHECK-NOT: -lstdc++
// CHECK-NOT: -lc++
// CHECK: -lm
+
+// Make sure -lstdc++ isn't rewritten to the default stdlib when -nostdlib++ is
+// used.
+//
+// RUN: %clangxx -target i686-pc-linux-gnu -### \
+// RUN: -nostdlib++ -stdlib=libc++ -lstdc++ %s 2> %t
+// RUN: FileCheck --check-prefix=CHECK-RESERVED-LIB-REWRITE < %t %s
+// CHECK-RESERVED-LIB-REWRITE: -lstdc++
+// CHECK-RESERVED-LIB-REWRITE-NOT: -lc++
OpenPOWER on IntegriCloud