From ae641186deef000791a16716f73b9a82da3b7fd6 Mon Sep 17 00:00:00 2001 From: John Laxson Date: Fri, 8 Oct 2021 10:30:45 -0700 Subject: [PATCH] also change osx_cc_wrapper.sh --- tools/cpp/osx_cc_wrapper.sh | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/tools/cpp/osx_cc_wrapper.sh b/tools/cpp/osx_cc_wrapper.sh index 8c9c111a750587..9566c49b144695 100755 --- a/tools/cpp/osx_cc_wrapper.sh +++ b/tools/cpp/osx_cc_wrapper.sh @@ -76,22 +76,9 @@ function get_library_path() { done } -# A convenient method to return the actual path even for non symlinks -# and multi-level symlinks. -function get_realpath() { - local previous="$1" - local next=$(readlink "${previous}") - while [ -n "${next}" ]; do - previous="${next}" - next=$(readlink "${previous}") - done - echo "${previous}" -} - # Get the path of a lib inside a tool function get_otool_path() { - # the lib path is the path of the original lib relative to the workspace - get_realpath $1 | sed 's|^.*/bazel-out/|bazel-out/|' + ${OTOOL} -D "$1" | awk 'NR==2{print $1}' | sed 's|^.*/bazel-out/|bazel-out/|' } # Do replacements in the output