Skip to content

Commit 52a280b

Browse files
committed
[UBSan] Fix shared library linking in test for Darwin.
Without rpath information, the test fails on some Darwin platforms since the binary fails to find the shared library. rdar://110010041 Differential Revision: https://reviews.llvm.org/D154003
1 parent 6555c47 commit 52a280b

File tree

1 file changed

+2
-2
lines changed
  • compiler-rt/test/ubsan/TestCases/TypeCheck/Function

1 file changed

+2
-2
lines changed

compiler-rt/test/ubsan/TestCases/TypeCheck/Function/function.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clangxx -std=c++17 -fsanitize=function %s -O3 -g -DSHARED_LIB -fPIC -shared -o %t-so.so
2-
// RUN: %clangxx -std=c++17 -fsanitize=function %s -O3 -g -o %t %t-so.so
1+
// RUN: %clangxx -std=c++17 -fsanitize=function %s -O3 -g -DSHARED_LIB -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
2+
// RUN: %clangxx -std=c++17 -fsanitize=function %s -O3 -g -o %t %ld_flags_rpath_exe
33
// RUN: %run %t 2>&1 | FileCheck %s --check-prefix=CHECK
44
// Verify that we can disable symbolization if needed:
55
// RUN: %env_ubsan_opts=symbolize=0 %run %t 2>&1 | FileCheck %s --check-prefix=NOSYM

0 commit comments

Comments
 (0)