2012-11-03 04:34:30 +08:00
|
|
|
// Test UndefinedBehaviorSanitizer ld flags.
|
|
|
|
|
2012-11-23 18:39:49 +08:00
|
|
|
// RUN: %clang -fsanitize=undefined %s -### -o %t.o 2>&1 \
|
2012-11-03 04:34:30 +08:00
|
|
|
// RUN: -target i386-unknown-linux \
|
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-LINUX %s
|
|
|
|
// CHECK-LINUX: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-LINUX-NOT: "-lc"
|
|
|
|
// CHECK-LINUX: libclang_rt.ubsan-i386.a"
|
|
|
|
// CHECK-LINUX: "-lpthread"
|
2012-11-23 18:39:49 +08:00
|
|
|
|
|
|
|
// RUN: %clang -fsanitize=bounds %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: -target i386-unknown-linux \
|
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-LINUX1 %s
|
|
|
|
// CHECK-LINUX1: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-LINUX1-NOT: libclang_rt.ubsan-i386.a"
|
|
|
|
// CHECK-LINUX1-NOT: "-lpthread"
|