diff options
Diffstat (limited to 'test/Driver/nostdlibxx.cpp')
-rw-r--r-- | test/Driver/nostdlibxx.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Driver/nostdlibxx.cpp b/test/Driver/nostdlibxx.cpp index 02bd62d96a..48d14e15a6 100644 --- a/test/Driver/nostdlibxx.cpp +++ b/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++ |