1 /// General tests that the ld -z relax=transtls workaround is only applied 2 /// on Solaris/amd64. 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 --target=sparc-sun-solaris2.11 %s -### -fuse-ld= \ 7 // RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \ 8 // RUN: | FileCheck --check-prefix=CHECK-LD %s 9 10 /// Check sparc-sun-solaris2.11, 32bit 11 // RUN: %clang -fsanitize=undefined --target=sparc-sun-solaris2.11 %s -### -fuse-ld= \ 12 // RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \ 13 // RUN: | FileCheck --check-prefix=CHECK-LD %s 14 15 /// Check sparc-sun-solaris2.11, 64bit 16 // RUN: %clang -m64 --target=sparc-sun-solaris2.11 %s -### -fuse-ld= \ 17 // RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \ 18 // RUN: | FileCheck --check-prefix=CHECK-LD %s 19 20 /// Check sparc-sun-solaris2.11, 64bit 21 // RUN: %clang -m64 -fsanitize=undefined --target=sparc-sun-solaris2.11 %s -### -fuse-ld= \ 22 // RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \ 23 // RUN: | FileCheck --check-prefix=CHECK-LD %s 24 25 /// Check i386-pc-solaris2.11, 32bit 26 // RUN: %clang --target=i386-pc-solaris2.11 %s -### -fuse-ld= \ 27 // RUN: --sysroot=%S/Inputs/solaris_x86_tree 2>&1 \ 28 // RUN: | FileCheck --check-prefix=CHECK-LD %s 29 30 /// Check i386-pc-solaris2.11, 32bit 31 // RUN: %clang -fsanitize=undefined --target=i386-pc-solaris2.11 %s -### -fuse-ld= \ 32 // RUN: --sysroot=%S/Inputs/solaris_x86_tree 2>&1 \ 33 // RUN: | FileCheck --check-prefix=CHECK-LD %s 34 35 /// Check i386-pc-solaris2.11, 64bit 36 // RUN: %clang -m64 --target=i386-pc-solaris2.11 %s -### -fuse-ld= \ 37 // RUN: --sysroot=%S/Inputs/solaris_x86_tree 2>&1 \ 38 // RUN: | FileCheck --check-prefix=CHECK-LD %s 39 40 // CHECK-LD-NOT: "-z" "relax=transtls" 41 42 /// Check i386-pc-solaris2.11, 64bit 43 // RUN: %clang -m64 -fsanitize=undefined --target=i386-pc-solaris2.11 %s -### -fuse-ld= \ 44 // RUN: --sysroot=%S/Inputs/solaris_x86_tree 2>&1 \ 45 // RUN: | FileCheck --check-prefix=CHECK-LD-X64-UBSAN %s 46 // RUN: %clang -m64 -fsanitize=undefined --target=i386-pc-solaris2.11 %s -### -fuse-ld=gld \ 47 // RUN: --sysroot=%S/Inputs/solaris_x86_tree 2>&1 \ 48 // RUN: | FileCheck --check-prefix=CHECK-GLD-X64-UBSAN %s 49 50 // CHECK-LD-X64-UBSAN: "-z" "relax=transtls" 51 // CHECK-GLD-X64-UBSAN-NOT: "-z" "relax=transtls" 52 53 /// General tests that the ld -z now workaround is only applied on 54 /// Solaris/i386 with shared libclang_rt.asan. Note that we use sysroot to 55 /// make these tests independent of the host system. 56 57 /// Check i386-pc-solaris2.11, 32bit, shared libclang_rt.asan 58 // RUN: %clang -fsanitize=address -shared-libasan --target=i386-pc-solaris2.11 %s -### 2>&1 \ 59 // RUN: --sysroot=%S/Inputs/solaris_x86_tree \ 60 // RUN: | FileCheck --check-prefix=CHECK-LD-X32-ASAN-SHARED %s 61 // CHECK-LD-X32-ASAN-SHARED: "-z" "now" 62 63 /// Check i386-pc-solaris2.11, 32bit, static libclang_rt.asan 64 // RUN: %clang -fsanitize=address --target=i386-pc-solaris2.11 %s -### 2>&1 \ 65 // RUN: --sysroot=%S/Inputs/solaris_x86_tree \ 66 // RUN: | FileCheck --check-prefix=CHECK-LD-X32-ASAN %s 67 // CHECK-LD-X32-ASAN-NOT: "-z" "now" 68