diff options
author | 2017-05-03 22:13:44 +0200 | |
---|---|---|
committer | 2017-05-04 13:13:49 +0200 | |
commit | cc21998c299b4d1f97df37b961552ff8168da17f (patch) | |
tree | 85a5a1845a1802842e5bf127d3b07f34c36eb52d /tools/objc/libtool.sh | |
parent | 655c07b87161030f73f8e2103aebcf8277051582 (diff) |
Rollforward #2 of: Basic open-source crosstool to support targeting apple platform types.
RELNOTES: None.
PiperOrigin-RevId: 154993630
Diffstat (limited to 'tools/objc/libtool.sh')
-rwxr-xr-x | tools/objc/libtool.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/objc/libtool.sh b/tools/objc/libtool.sh index 5ad89a019d..e1275758ea 100755 --- a/tools/objc/libtool.sh +++ b/tools/objc/libtool.sh @@ -23,7 +23,15 @@ set -eu -MY_LOCATION=${MY_LOCATION:-"$0.runfiles/bazel_tools/tools/objc"} +# A trick to allow invoking this script in multiple contexts. +if [ -z ${MY_LOCATION+x} ]; then + if [ -d "$0.runfiles/" ]; then + MY_LOCATION="$0.runfiles/bazel_tools/tools/objc" + else + MY_LOCATION="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + fi +fi + WRAPPER="${MY_LOCATION}/xcrunwrapper.sh" # Creates a symbolic link to the input argument file and returns the symlink |