blob: 48d14e15a61f9bf0ed7c2087486e179bce9c04e8 [file] [log] [blame]
Nico Weber0ee47d92017-07-25 18:02:57 +00001// RUN: %clangxx -target i686-pc-linux-gnu -### -nostdlib++ %s 2> %t
2// RUN: FileCheck < %t %s
3
4// We should still have -lm and the C standard libraries, but not -lstdc++.
5
6// CHECK-NOT: -lstdc++
7// CHECK-NOT: -lc++
8// CHECK: -lm
Dan Albertf5ffa1a2018-12-18 23:29:35 +00009
10// Make sure -lstdc++ isn't rewritten to the default stdlib when -nostdlib++ is
11// used.
12//
13// RUN: %clangxx -target i686-pc-linux-gnu -### \
14// RUN: -nostdlib++ -stdlib=libc++ -lstdc++ %s 2> %t
15// RUN: FileCheck --check-prefix=CHECK-RESERVED-LIB-REWRITE < %t %s
16// CHECK-RESERVED-LIB-REWRITE: -lstdc++
17// CHECK-RESERVED-LIB-REWRITE-NOT: -lc++