]>
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"
39 ASAN_DYLIB
="clang_rt.asan_$(RC_PROJECT_COMPILATION_PLATFORM)_dynamic.dylib"
40 TSAN_DYLIB
="clang_rt.tsan_$(RC_PROJECT_COMPILATION_PLATFORM)_dynamic.dylib"
46 for VARIANT
in ${BUILD_VARIANTS}
51 # change address sanitizer @rpath reference
53 ASAN_FILE
="${DSTROOT}${INSTALL_PATH}/"
54 if [ -n "${EXECUTABLE_FOLDER_PATH}" ]; then
55 ASAN_FILE
+="${EXECUTABLE_FOLDER_PATH}/"
57 ASAN_FILE
+="${EXECUTABLE_PREFIX}${PRODUCT_NAME}_asan${EXECUTABLE_SUFFIX}"
59 if [ -x "${ASAN_FILE}" ]; then
60 if [ ${xsan_setup} -eq 0 ]; then
67 "@rpath/lib${ASAN_DYLIB}" \
68 "${XSAN_DIR}/lib${ASAN_DYLIB}" \
71 echo "install_name_tool failed"
79 # change thread sanitizer @rpath reference
81 TSAN_FILE
="${DSTROOT}${INSTALL_PATH}/"
82 if [ -n "${EXECUTABLE_FOLDER_PATH}" ]; then
83 TSAN_FILE
+="${EXECUTABLE_FOLDER_PATH}/"
85 TSAN_FILE
+="${EXECUTABLE_PREFIX}${PRODUCT_NAME}_tsan${EXECUTABLE_SUFFIX}"
87 if [ -x "${TSAN_FILE}" ]; then
88 if [ ${xsan_setup} -eq 0 ]; then
95 "@rpath/lib${TSAN_DYLIB}" \
96 "${XSAN_DIR}/lib${TSAN_DYLIB}" \
99 echo "install_name_tool failed"