xref: /llvm-project/clang/test/Driver/solaris-ld-values.cpp (revision f5991161529511ca6ebc058da2a0507c2fc5283e)
1 // General tests that the correct versions of values-*.o are used on
2 // Solaris targets sane. Note that we use sysroot to make these tests
3 // independent of the host system.
4 
5 // Check sparc-sun-solaris2.11, 32bit
6 // RUN: %clang -ansi -### %s 2>&1 \
7 // RUN:     --target=sparc-sun-solaris2.11 \
8 // RUN:     --sysroot=%S/Inputs/solaris_sparc_tree \
9 // RUN:   | FileCheck --check-prefix=CHECK-LD-SPARC32-ANSI %s
10 // CHECK-LD-SPARC32-ANSI: values-Xc.o
11 // CHECK-LD-SPARC32-ANSI: values-xpg6.o
12 
13 // RUN: %clang -std=c++98 -### %s 2>&1 \
14 // RUN:     --target=sparc-sun-solaris2.11 \
15 // RUN:     --sysroot=%S/Inputs/solaris_sparc_tree \
16 // RUN:   | FileCheck --check-prefix=CHECK-LD-SPARC32-CPP98 %s
17 // CHECK-LD-SPARC32-CPP98: values-Xc.o
18 // CHECK-LD-SPARC32-CPP98: values-xpg6.o
19 
20 // RUN: %clang -std=c++11 -### %s 2>&1 \
21 // RUN:     --target=sparc-sun-solaris2.11 \
22 // RUN:     --sysroot=%S/Inputs/solaris_sparc_tree \
23 // RUN:   | FileCheck --check-prefix=CHECK-LD-SPARC32-CPP11 %s
24 // CHECK-LD-SPARC32-CPP11: values-Xc.o
25 // CHECK-LD-SPARC32-CPP11: values-xpg6.o
26 
27 // RUN: %clang -std=gnu++98 -### %s 2>&1 \
28 // RUN:     --target=sparc-sun-solaris2.11 \
29 // RUN:     --sysroot=%S/Inputs/solaris_sparc_tree \
30 // RUN:   | FileCheck --check-prefix=CHECK-LD-SPARC32-GNUPP98 %s
31 // CHECK-LD-SPARC32-GNUPP98: values-Xa.o
32 // CHECK-LD-SPARC32-GNUPP98: values-xpg6.o
33 
34 // Check i386-pc-solaris2.11, 32bit
35 // RUN: %clang -ANSI -### %s 2>&1 \
36 // RUN:     --target=i386-pc-solaris2.11 \
37 // RUN:     --sysroot=%S/Inputs/solaris_x86_tree \
38 // RUN:   | FileCheck --check-prefix=CHECK-LD-X32-ANSI %s
39 // CHECK-LD-X32-ANSI: values-Xa.o
40 // CHECK-LD-X32-ANSI: values-xpg6.o
41