68 lines · c
1/// General tests that the ld -z relax=transtls workaround is only applied2/// on Solaris/amd64. Note that we use sysroot to make these tests3/// independent of the host system.4 5/// Check sparc-sun-solaris2.11, 32bit6// 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 %s9 10/// Check sparc-sun-solaris2.11, 32bit11// 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 %s14 15/// Check sparc-sun-solaris2.11, 64bit16// 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 %s19 20/// Check sparc-sun-solaris2.11, 64bit21// 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 %s24 25/// Check i386-pc-solaris2.11, 32bit26// 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 %s29 30/// Check i386-pc-solaris2.11, 32bit31// 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 %s34 35/// Check i386-pc-solaris2.11, 64bit36// 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 %s39 40// CHECK-LD-NOT: "-z" "relax=transtls"41 42/// Check i386-pc-solaris2.11, 64bit43// 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 %s46// 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 %s49 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 on54/// Solaris/i386 with shared libclang_rt.asan. Note that we use sysroot to55/// make these tests independent of the host system.56 57/// Check i386-pc-solaris2.11, 32bit, shared libclang_rt.asan58// 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 %s61// CHECK-LD-X32-ASAN-SHARED: "-z" "now"62 63/// Check i386-pc-solaris2.11, 32bit, static libclang_rt.asan64// 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 %s67// CHECK-LD-X32-ASAN-NOT: "-z" "now"68