diff options
author | cparsons <cparsons@google.com> | 2017-04-28 18:24:52 +0200 |
---|---|---|
committer | Vladimir Moskva <vladmos@google.com> | 2017-04-28 18:33:45 +0200 |
commit | 5038016e6573962d2554fcf9c10faa0cca8714e2 (patch) | |
tree | 27c3a70a80ac6a8dac7bda9e11ed364a2d076185 /tools/objc | |
parent | 151d1933823922ba9b8856c3c26c30dbd234fd27 (diff) |
Rollforward of: Basic open-source crosstool to support targeting apple platform types.
RELNOTES: None.
PiperOrigin-RevId: 154547417
Diffstat (limited to 'tools/objc')
-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 |