forked from OSchip/llvm-project
Link in the ubsan runtime when building shared objects.
llvm-svn: 188325
This commit is contained in:
parent
4e28b26589
commit
bbd6db8032
|
@ -1734,9 +1734,6 @@ static void addLsanRTLinux(const ToolChain &TC, const ArgList &Args,
|
|||
static void addUbsanRTLinux(const ToolChain &TC, const ArgList &Args,
|
||||
ArgStringList &CmdArgs, bool IsCXX,
|
||||
bool HasOtherSanitizerRt) {
|
||||
if (Args.hasArg(options::OPT_shared))
|
||||
return;
|
||||
|
||||
// Need a copy of sanitizer_common. This could come from another sanitizer
|
||||
// runtime; if we're not including one, include our own copy.
|
||||
if (!HasOtherSanitizerRt)
|
||||
|
|
|
@ -152,7 +152,7 @@
|
|||
// RUN: -shared \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-UBSAN-LINUX-SHARED %s
|
||||
// CHECK-UBSAN-LINUX-SHARED: "{{.*}}ld{{(.exe)?}}"
|
||||
// CHECK-UBSAN-LINUX-SHARED-NOT: libclang_rt.ubsan-i386.a"
|
||||
// CHECK-UBSAN-LINUX-SHARED: libclang_rt.ubsan-i386.a"
|
||||
|
||||
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
||||
// RUN: -target x86_64-unknown-linux -fsanitize=leak \
|
||||
|
|
Loading…
Reference in New Issue