Run install_name_tool to fix the dynamic library ID after it has been copied.

Fixes http://code.google.com/p/address-sanitizer/issues/detail?id=113

llvm-svn: 164031
This commit is contained in:
Alexander Potapenko 2012-09-17 14:18:41 +00:00
parent 7bd2914683
commit 8bea579738
1 changed files with 2 additions and 0 deletions

View File

@ -149,6 +149,8 @@ $(ResourceLibDir)/$1/libclang_rt.%.dylib: \
$(ResourceLibDir)/$1/.dir
$(Echo) Copying runtime library $1/$$* to build dir
$(Verb) cp $(PROJ_OBJ_DIR)/clang_$1/$$*/libcompiler_rt.dylib $$@
$(Echo) Fixing LC_ID_DYLIB of $$@
$(Verb) install_name_tool $$@ -id $$@
RuntimeLibrary.$1: \
$(RuntimeLibrary.$1.Configs:%=$(ResourceLibDir)/$1/libclang_rt.%)
.PHONY: RuntimeLibrary.$1