File tree Expand file tree Collapse file tree 5 files changed +19
-10
lines changed Expand file tree Collapse file tree 5 files changed +19
-10
lines changed Original file line number Diff line number Diff line change @@ -875,7 +875,7 @@ def is_windows_lto_supported():
875875 config .substitutions .append (
876876 (
877877 "%ld_flags_rpath_so" + postfix ,
878- "-install_name @rpath/`basename %dynamiclib{}` " .format (postfix ),
878+ "-install_name @rpath/%base_dynamiclib{} " .format (postfix ),
879879 )
880880 )
881881 elif config .target_os in ("FreeBSD" , "NetBSD" , "OpenBSD" ):
@@ -908,6 +908,9 @@ def is_windows_lto_supported():
908908 config .substitutions .append (
909909 ("%dynamiclib" + postfix , "%t.dir/%xdynamiclib_filename" + postfix )
910910 )
911+ config .substitutions .append (
912+ ("%base_dynamiclib" + postfix , "%xdynamiclib_filename" + postfix )
913+ )
911914 config .substitutions .append (
912915 (
913916 "%xdynamiclib_filename" + postfix ,
Original file line number Diff line number Diff line change 99// RUN: %clangxx_tsan %s -o %t.so -shared -DSHARED_LIB
1010// RUN: %clangxx_tsan -fno-sanitize=thread %s -o %t
1111
12- // RUN: TSAN_DYLIB_PATH=` %clangxx_tsan %s -### 2>&1 \
12+ // RUN: %clangxx_tsan %s -### 2>&1 \
1313// RUN: | grep "libclang_rt.tsan_osx_dynamic.dylib" \
14- // RUN: | sed -e 's/.*"\(.*libclang_rt.tsan_osx_dynamic.dylib\)".*/\1/'`
14+ // RUN: | sed -e 's/.*"\(.*libclang_rt.tsan_osx_dynamic.dylib\)".*/\1/' \
15+ // RUN: | tr -d '\n' > %t.tsan_dylib_path
1516
1617// Launching a non-instrumented binary that dlopen's an instrumented library should fail.
1718// RUN: not %run %t %t.so 2>&1 | FileCheck %s --check-prefix=CHECK-FAIL
1819// Launching a non-instrumented binary with an explicit DYLD_INSERT_LIBRARIES should work.
19- // RUN: DYLD_INSERT_LIBRARIES=$TSAN_DYLIB_PATH %run %t %t.so 2>&1 | FileCheck %s
20+ // RUN: env DYLD_INSERT_LIBRARIES="%{readfile:%t.tsan_dylib_path}" %run %t %t.so 2>&1 | FileCheck %s
2021
2122#include < dlfcn.h>
2223#include < pthread.h>
Original file line number Diff line number Diff line change 1+ // RUN: basename %t-lib.dylib | tr -d '\n' > %t.basename
12// RUN: %clangxx_tsan -shared %p/external-lib.cpp -fno-sanitize=thread -DUSE_TSAN_CALLBACKS \
2- // RUN: -o %t-lib.dylib -install_name @rpath/`basename %t-lib.dylib`
3+ // RUN: -o %t-lib.dylib -install_name @rpath/%{readfile:%t.basename}
34
5+ // RUN: basename %t-module.dylib | tr -d '\n' > %t.basename
46// RUN: %clangxx_tsan -shared %p/external-noninstrumented-module.cpp %t-lib.dylib -fno-sanitize=thread \
5- // RUN: -o %t-module.dylib -install_name @rpath/`basename %t-module.dylib`
7+ // RUN: -o %t-module.dylib -install_name @rpath/%{readfile:%t.basename}
68
79// RUN: %clangxx_tsan %s %t-module.dylib -o %t
810// RUN: %run %t 2>&1 | FileCheck %s
Original file line number Diff line number Diff line change 1+ // RUN: basename %t-lib-instrumented.dylib | tr -d '\n' > %t.basename
12// RUN: %clangxx_tsan %p/external-lib.cpp -shared \
23// RUN: -o %t-lib-instrumented.dylib \
3- // RUN: -install_name @rpath/`basename %t-lib-instrumented.dylib`
4+ // RUN: -install_name @rpath/%{readfile:%t.basename}
45
6+ // RUN: basename %t-lib-noninstrumented.dylib | tr -d '\n' > %t.basename
57// RUN: %clangxx_tsan %p/external-lib.cpp -shared -fno-sanitize=thread \
68// RUN: -o %t-lib-noninstrumented.dylib \
7- // RUN: -install_name @rpath/`basename %t-lib-noninstrumented.dylib`
9+ // RUN: -install_name @rpath/%{readfile:%t.basename}
810
11+ // RUN: basename %t-lib-noninstrumented-callbacks.dylib | tr -d '\n' > %t.basename
912// RUN: %clangxx_tsan %p/external-lib.cpp -shared -fno-sanitize=thread -DUSE_TSAN_CALLBACKS \
1013// RUN: -o %t-lib-noninstrumented-callbacks.dylib \
11- // RUN: -install_name @rpath/`basename %t-lib-noninstrumented-callbacks.dylib`
14+ // RUN: -install_name @rpath/%{readfile:%t.basename}
1215
1316// RUN: %clangxx_tsan %s %t-lib-instrumented.dylib -o %t-lib-instrumented
1417// RUN: %clangxx_tsan %s %t-lib-noninstrumented.dylib -o %t-lib-noninstrumented
Original file line number Diff line number Diff line change 44// use syscalls directly) to make sure other interceptors aren't called.
55
66// RUN: %clangxx_tsan -O1 %s -o %t
7- // RUN: MallocStackLogging=1 %run %t 2>&1 | FileCheck %s
7+ // RUN: env MallocStackLogging=1 %run %t 2>&1 | FileCheck %s
88#include < pthread.h>
99#include < stdlib.h>
1010#include < stdio.h>
You can’t perform that action at this time.
0 commit comments