Skip to content

Commit

Permalink
Fix issue where libtool_check_unique isn't found for sandbox builds
Browse files Browse the repository at this point in the history
It seems that for sandbox builds, the executable isn't copied over. libtool still succeeds, but it prints out an error message about the missing executable. This change, which I just made to mimic wrapped_clang, appears to fix it. I have no idea if there are other changes that should also be made for this, e.g. in tools/osx/crosstool/cc_toolchain_config.bzl wrapped_clang is referenced a lot but libtool_check_unique is not.

Closes #12046.

PiperOrigin-RevId: 332511362
  • Loading branch information
michaeleisel authored and laurentlb committed Oct 2, 2020
1 parent 9f06be4 commit b67b75e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/objc/libtool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ WRAPPER="${MY_LOCATION}/xcrunwrapper.sh"
# Ensure 0 timestamping for hermetic results.
export ZERO_AR_DATE=1

if "${MY_LOCATION}"/libtool_check_unique "$@"; then
if [ ! -f "${MY_LOCATION}"/libtool_check_unique ] ; then
echo "libtool_check_unique not found. Please file an issue at github.com/bazelbuild/bazel"
elif "${MY_LOCATION}"/libtool_check_unique "$@"; then
# If there are no duplicate .o basenames,
# libtool can be invoked with the original arguments.
"${WRAPPER}" libtool "$@"
Expand Down
1 change: 1 addition & 0 deletions tools/osx/crosstool/BUILD.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ cc_toolchain_suite(
":builtin_include_directory_paths",
":cc_wrapper",
":libtool",
":libtool_check_unique",
":make_hashed_objlist.py",
":wrapped_clang",
":wrapped_clang_pp",
Expand Down

0 comments on commit b67b75e

Please sign in to comment.