aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Topher <topher.the.geek@gmail.com>2015-08-19 09:23:46 +0000
committerGravatar Lukacs Berki <lberki@google.com>2015-08-20 14:47:39 +0000
commit50adddf01b8d7f46fba6bee12ebbb41c31c87165 (patch)
tree177878ecd90ec44d82e2a988a7494f93a84d1f8d /tools
parenta3a33d75393df267303a517ac72b87d4f11cad31 (diff)
Fixes to use dylib on MacOS X.
The change in LinkCommandLine.java fixes the error "ld: library not found for -ltbb.dylib". The change in osx_gcc_wrapper.sh fixes the error "dyld: Library not loaded: @rpath/libtbb.dylib". See https://groups.google.com/forum/#!topic/bazel-discuss/bs8BnXYRjzY -- Change-Id: I7feb02eee7d059d86a6d29af391dc2fc71e1d0cc Reviewed-on: https://bazel-review.googlesource.com/#/c/1831/ MOS_MIGRATED_REVID=101007071
Diffstat (limited to 'tools')
-rwxr-xr-xtools/cpp/osx_gcc_wrapper.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/cpp/osx_gcc_wrapper.sh b/tools/cpp/osx_gcc_wrapper.sh
index a8eb46ab8f..d41854a63f 100755
--- a/tools/cpp/osx_gcc_wrapper.sh
+++ b/tools/cpp/osx_gcc_wrapper.sh
@@ -58,8 +58,8 @@ ${GCC} "$@"
function get_library_path() {
for libdir in ${LIB_DIRS}; do
- if [ -f ${libdir}/lib$1.so ]; then
- echo "${libdir}/lib$1.so"
+ if [ -f ${libdir}/lib$1.dylib ]; then
+ echo "${libdir}/lib$1.dylib"
fi
done
}
@@ -87,7 +87,7 @@ if [ -n "${RPATH}" ]; then
for lib in ${LIBS}; do
libpath=$(get_library_path ${lib})
if [ -n "${libpath}" ]; then
- ${INSTALL_NAME_TOOL} -change $(get_otool_path "${libpath}") "@loader_path/${RPATH}/lib${lib}.so" "${OUTPUT}"
+ ${INSTALL_NAME_TOOL} -change "@rpath/lib${lib}.dylib" $(get_otool_path "${libpath}") "${OUTPUT}"
fi
done
fi