Skip to content

Commit

Permalink
also change osx_cc_wrapper.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jlaxson committed Oct 8, 2021
1 parent 3d25266 commit ae64118
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions tools/cpp/osx_cc_wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ae64118

Please sign in to comment.