aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/objc
diff options
context:
space:
mode:
authorGravatar cparsons <cparsons@google.com>2017-04-17 19:49:54 +0200
committerGravatar Klaus Aehlig <aehlig@google.com>2017-04-18 11:32:37 +0200
commit501b62716af12ba42c019bd9f231468b3c144757 (patch)
treef083fd3ab91d1b22395df97879b5e3c475eb9aeb /tools/objc
parented666fc2d54366fef2170d4451ae0ed9d0421e60 (diff)
Basic open-source crosstool to support targetting apple platform types.
RELNOTES: None. PiperOrigin-RevId: 153360877
Diffstat (limited to 'tools/objc')
-rwxr-xr-xtools/objc/libtool.sh10
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