Skip to content

Commit 8ec8743

Browse files
keithcopybara-github
authored andcommitted
Use xcrun to invoke install_name_tool
`/usr/bin/install_name_tool` is a shim; it invokes install_name_tool in the current active Xcode. This allows using this template file to configure toolchain on non-macOS. This doesn't change the behavior as both will end up invoking the same tool. replaces bazelbuild#13462 Closes bazelbuild#16951. PiperOrigin-RevId: 501557408 Change-Id: Ibf0b90aaf18bd703079296248cd66dc6f86359f1
1 parent e8182ce commit 8ec8743

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tools/cpp/osx_cc_wrapper.sh.tpl

+1-3
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
#
2828
set -eu
2929

30-
INSTALL_NAME_TOOL="/usr/bin/install_name_tool"
31-
3230
LIBS=
3331
LIB_DIRS=
3432
RPATHS=
@@ -110,7 +108,7 @@ for rpath in ${RPATHS}; do
110108
if [[ -n "${libname-}" ]]; then
111109
libpath=$(get_library_path ${lib})
112110
if [ -n "${libpath}" ]; then
113-
${INSTALL_NAME_TOOL} -change $(get_otool_path "${libpath}") \
111+
/usr/bin/xcrun install_name_tool -change $(get_otool_path "${libpath}") \
114112
"@loader_path/${rpath}/${libname}" "${OUTPUT}"
115113
fi
116114
fi

0 commit comments

Comments
 (0)