]>
git.saurik.com Git - apple/configd.git/blob - update-sanitizer-dylib-references
4 # fix address-sanitizer library @rpath references
8 XSAN_DIR
="/usr/local/lib/sanitizers"
9 case "${PLATFORM_NAME}" in
11 ASAN_DYLIB
="clang_rt.asan_osx_dynamic.dylib"
12 TSAN_DYLIB
="clang_rt.tsan_osx_dynamic.dylib"
15 ASAN_DYLIB
="clang_rt.asan_ios_dynamic.dylib"
16 TSAN_DYLIB
="clang_rt.tsan_ios_dynamic.dylib"
19 ASAN_DYLIB
="clang_rt.asan_iossim_dynamic.dylib"
20 TSAN_DYLIB
="clang_rt.tsan_iossim_dynamic.dylib"
23 ASAN_DYLIB
="clang_rt.asan_tvos_dynamic.dylib"
24 TSAN_DYLIB
="clang_rt.tsan_tvos_dynamic.dylib"
27 ASAN_DYLIB
="clang_rt.asan_tvossim_dynamic.dylib"
28 TSAN_DYLIB
="clang_rt.tsan_tvossim_dynamic.dylib"
31 ASAN_DYLIB
="clang_rt.asan_watchos_dynamic.dylib"
32 TSAN_DYLIB
="clang_rt.tsan_watchos_dynamic.dylib"
35 ASAN_DYLIB
="clang_rt.asan_watchossim_dynamic.dylib"
36 TSAN_DYLIB
="clang_rt.tsan_watchossim_dynamic.dylib"
40 echo "*** Unexpected PLATFORM_NAME \"${PLATFORM_NAME}\", using \"$(RC_PROJECT_COMPILATION_PLATFORM)\""
42 ASAN_DYLIB
="clang_rt.asan_$(RC_PROJECT_COMPILATION_PLATFORM)_dynamic.dylib"
43 TSAN_DYLIB
="clang_rt.tsan_$(RC_PROJECT_COMPILATION_PLATFORM)_dynamic.dylib"
49 for VARIANT
in ${BUILD_VARIANTS}
54 # change address sanitizer @rpath reference
56 ASAN_FILE
="${DSTROOT}${INSTALL_PATH}/"
57 if [ -n "${EXECUTABLE_FOLDER_PATH}" ]; then
58 ASAN_FILE
+="${EXECUTABLE_FOLDER_PATH}/"
60 ASAN_FILE
+="${EXECUTABLE_PREFIX}${PRODUCT_NAME}_asan${EXECUTABLE_SUFFIX}"
62 if [ -x "${ASAN_FILE}" ]; then
63 if [ ${xsan_setup} -eq 0 ]; then
70 "@rpath/lib${ASAN_DYLIB}" \
71 "${XSAN_DIR}/lib${ASAN_DYLIB}" \
74 echo "install_name_tool failed"
82 # change thread sanitizer @rpath reference
84 TSAN_FILE
="${DSTROOT}${INSTALL_PATH}/"
85 if [ -n "${EXECUTABLE_FOLDER_PATH}" ]; then
86 TSAN_FILE
+="${EXECUTABLE_FOLDER_PATH}/"
88 TSAN_FILE
+="${EXECUTABLE_PREFIX}${PRODUCT_NAME}_tsan${EXECUTABLE_SUFFIX}"
90 if [ -x "${TSAN_FILE}" ]; then
91 if [ ${xsan_setup} -eq 0 ]; then
98 "@rpath/lib${TSAN_DYLIB}" \
99 "${XSAN_DIR}/lib${TSAN_DYLIB}" \
101 if [ $?
-ne 0 ]; then
102 echo "install_name_tool failed"