[compiler-rt] 52a280b - [UBSan] Fix shared library linking in test for Darwin.

usama hameed via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 30 13:00:48 PDT 2023


Author: usama hameed
Date: 2023-06-30T13:00:29-07:00
New Revision: 52a280bb60c20e12df3e1e91701f6338e03595d1

URL: https://github.com/llvm/llvm-project/commit/52a280bb60c20e12df3e1e91701f6338e03595d1
DIFF: https://github.com/llvm/llvm-project/commit/52a280bb60c20e12df3e1e91701f6338e03595d1.diff

LOG: [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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/ubsan/TestCases/TypeCheck/Function/function.cpp b/compiler-rt/test/ubsan/TestCases/TypeCheck/Function/function.cpp
index 965e865a26abd..ddd6933404c5e 100644
--- a/compiler-rt/test/ubsan/TestCases/TypeCheck/Function/function.cpp
+++ b/compiler-rt/test/ubsan/TestCases/TypeCheck/Function/function.cpp
@@ -1,5 +1,5 @@
-// RUN: %clangxx -std=c++17 -fsanitize=function %s -O3 -g -DSHARED_LIB -fPIC -shared -o %t-so.so
-// RUN: %clangxx -std=c++17 -fsanitize=function %s -O3 -g -o %t %t-so.so
+// RUN: %clangxx -std=c++17 -fsanitize=function %s -O3 -g -DSHARED_LIB -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
+// RUN: %clangxx -std=c++17 -fsanitize=function %s -O3 -g -o %t %ld_flags_rpath_exe
 // RUN: %run %t 2>&1 | FileCheck %s --check-prefix=CHECK
 // Verify that we can disable symbolization if needed:
 // RUN: %env_ubsan_opts=symbolize=0 %run %t 2>&1 | FileCheck %s --check-prefix=NOSYM


        


More information about the llvm-commits mailing list