Resolve ibtoolwrapper at the right path
Previously, bazel_tools would be under whatever.runfiles/workspace-name/external/bazel_tools. However, we allowed "" as the workspace name (and Bazel's workspace name was "") so a lot of scripts started assuming that bazel_tools would be at whatever.runfiles/external/bazel_tools.
Going forward, the runfiles tree looks like:
whatever.runfiles/
__main__/
...
bazel_tools/
tools/
objc/
...
some_other_repo/
...
So all of the repos are on the same "level" of the directory tree. This lets you refer to runfiles the same way (x.runfiles/repo/path/to/your/thing) whether you're running locally or importing it as an external repository (see https://github.com/bazelbuild/bazel/wiki/Updating-the-runfiles-tree-structure for more detail than you probably care about).
Fixes #1227.
--
MOS_MIGRATED_REVID=121435276
diff --git a/src/tools/xcode/actoolwrapper/actoolwrapper.sh b/src/tools/xcode/actoolwrapper/actoolwrapper.sh
index 308884c..9426a64 100755
--- a/src/tools/xcode/actoolwrapper/actoolwrapper.sh
+++ b/src/tools/xcode/actoolwrapper/actoolwrapper.sh
@@ -21,7 +21,7 @@
set -eu
-MY_LOCATION=${MY_LOCATION:-"$0.runfiles/external/bazel_tools/tools/objc"}
+MY_LOCATION=${MY_LOCATION:-"$0.runfiles/bazel_tools/tools/objc"}
REALPATH="${MY_LOCATION}/realpath"
WRAPPER="${MY_LOCATION}/xcrunwrapper.sh"
diff --git a/src/tools/xcode/ibtoolwrapper/ibtoolwrapper.sh b/src/tools/xcode/ibtoolwrapper/ibtoolwrapper.sh
index 091c1c8..8e3d53d 100755
--- a/src/tools/xcode/ibtoolwrapper/ibtoolwrapper.sh
+++ b/src/tools/xcode/ibtoolwrapper/ibtoolwrapper.sh
@@ -25,7 +25,7 @@
set -eu
-MY_LOCATION=${MY_LOCATION:-"$0.runfiles/external/bazel_tools/tools/objc"}
+MY_LOCATION=${MY_LOCATION:-"$0.runfiles/bazel_tools/tools/objc"}
REALPATH="${MY_LOCATION}/realpath"
WRAPPER="${MY_LOCATION}/xcrunwrapper.sh"
diff --git a/src/tools/xcode/momcwrapper/momcwrapper.sh b/src/tools/xcode/momcwrapper/momcwrapper.sh
index a59fcb3..5e92603 100755
--- a/src/tools/xcode/momcwrapper/momcwrapper.sh
+++ b/src/tools/xcode/momcwrapper/momcwrapper.sh
@@ -22,7 +22,7 @@
set -eu
-MY_LOCATION=${MY_LOCATION:-"$0.runfiles/external/bazel_tools/tools/objc"}
+MY_LOCATION=${MY_LOCATION:-"$0.runfiles/bazel_tools/tools/objc"}
REALPATH="${MY_LOCATION}/realpath"
WRAPPER="${MY_LOCATION}/xcrunwrapper.sh"
diff --git a/src/tools/xcode/swiftstdlibtoolwrapper/swiftstdlibtoolwrapper.sh b/src/tools/xcode/swiftstdlibtoolwrapper/swiftstdlibtoolwrapper.sh
index 16affad..11879cc 100755
--- a/src/tools/xcode/swiftstdlibtoolwrapper/swiftstdlibtoolwrapper.sh
+++ b/src/tools/xcode/swiftstdlibtoolwrapper/swiftstdlibtoolwrapper.sh
@@ -21,7 +21,7 @@
set -eu
-MY_LOCATION=${MY_LOCATION:-"$0.runfiles/external/bazel_tools/tools/objc"}
+MY_LOCATION=${MY_LOCATION:-"$0.runfiles/bazel_tools/tools/objc"}
REALPATH="${MY_LOCATION}/realpath"
WRAPPER="${MY_LOCATION}/xcrunwrapper.sh"