summaryrefslogtreecommitdiffstats
path: root/tools/clang
diff options
context:
space:
mode:
authorglider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-11 18:51:55 +0000
committerglider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-11 18:51:55 +0000
commit24bba3a084b054d9b527c5c354caeabf4492fcaa (patch)
tree33c47ae65870da084fd2f1f336d2edb75bfb4151 /tools/clang
parent7658b22512aadbd1c0770213851ab22b7a52f008 (diff)
downloadchromium_src-24bba3a084b054d9b527c5c354caeabf4492fcaa.zip
chromium_src-24bba3a084b054d9b527c5c354caeabf4492fcaa.tar.gz
chromium_src-24bba3a084b054d9b527c5c354caeabf4492fcaa.tar.bz2
When building Clang for Mac, make LC_ID_DYLIB of the ASan dynamic runtime to be relative to @executable_path.
BUG=170629 Review URL: https://codereview.chromium.org/11946043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181724 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/clang')
-rwxr-xr-xtools/clang/scripts/package.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/clang/scripts/package.sh b/tools/clang/scripts/package.sh
index ab24595..2f64b93 100755
--- a/tools/clang/scripts/package.sh
+++ b/tools/clang/scripts/package.sh
@@ -64,6 +64,13 @@ if [ "$(uname -s)" = "Darwin" ]; then
# Keep only Release+Asserts/lib/clang/3.2/lib/darwin/libclang_rt.asan_osx.a
find "${LLVM_LIB_DIR}/clang" -type f -path '*lib/darwin*' | grep -v asan | \
xargs rm
+ # Fix LC_ID_DYLIB for the ASan dynamic library to be relative to
+ # @executable_path.
+ # TODO(glider): this is transitional. We'll need to fix the dylib name
+ # either in our build system, or in Clang. See also http://crbug.com/170629.
+ ASAN_DYLIB_NAME=libclang_rt.asan_osx_dynamic.dylib
+ ASAN_DYLIB=$(find "${LLVM_LIB_DIR}/clang" -type f -path "*${ASAN_DYLIB_NAME}")
+ install_name_tool -id @executable_path/${ASAN_DYLIB_NAME} "${ASAN_DYLIB}"
else
# Keep only
# Release+Asserts/lib/clang/3.2/lib/linux/libclang_rt.{asan,tsan}-x86_64.a