Skip to content

Commit

Permalink
Copybara Merge: #275
Browse files Browse the repository at this point in the history
BEGIN_PUBLIC
Copybara import of the project:

--
e485793 by Yun Peng <[email protected]>:

Use full path for dirname and basename in osx_cc_wrapper.sh.tpl

Context: bazelbuild/rules_rust#2998

END_PUBLIC

COPYBARA_INTEGRATE_REVIEW=#275 from bazelbuild:meteorcloudy-patch-4 e485793
PiperOrigin-RevId: 697557587
Change-Id: I6ceb3d5f0fd747acb758926750fa48493edbdf3e
  • Loading branch information
meteorcloudy authored and copybara-github committed Nov 18, 2024
1 parent a0e347f commit 475a353
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cc/private/toolchain/osx_cc_wrapper.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ function call_install_name() {
for rpath in ${RPATHS}; do
for lib in ${LIBS}; do
unset libname
if [ -f "$(dirname ${OUTPUT})/${rpath}/lib${lib}.so" ]; then
if [ -f "$(/usr/bin/dirname ${OUTPUT})/${rpath}/lib${lib}.so" ]; then
libname="lib${lib}.so"
elif [ -f "$(dirname ${OUTPUT})/${rpath}/lib${lib}.dylib" ]; then
elif [ -f "$(/usr/bin/dirname ${OUTPUT})/${rpath}/lib${lib}.dylib" ]; then
libname="lib${lib}.dylib"
fi
# ${libname-} --> return $libname if defined, or undefined otherwise. This is to make
Expand All @@ -129,8 +129,8 @@ for rpath in ${RPATHS}; do
done
for libpath in ${LIB_PATHS}; do
if [ -f "$libpath" ]; then
libname=$(basename "$libpath")
if [ -f "$(dirname ${OUTPUT})/${rpath}/${libname}" ]; then
libname=$(/usr/bin/basename "$libpath")
if [ -f "$(/usr/bin/dirname ${OUTPUT})/${rpath}/${libname}" ]; then
call_install_name "${libpath}" "${rpath}" "${libname}"
fi
fi
Expand Down

0 comments on commit 475a353

Please sign in to comment.