Skip to content

Commit

Permalink
Find libtool when using BAZEL_USE_CPP_ONLY_TOOLCHAIN. (#17327)
Browse files Browse the repository at this point in the history
Instead of hardcoding `/usr/bin/libtool` which requires Xcode / Xcode CLT installed, which `BAZEL_USE_CPP_ONLY_TOOLCHAIN` is meant to avoid.

Related to #16009.

Closes #16010.

PiperOrigin-RevId: 503922158
Change-Id: I64392ada951938d612dd0b28141e6b2e4ee6952c

Co-authored-by: Uri Baghin <[email protected]>
  • Loading branch information
ShreeM01 and uri-canva authored Jan 27, 2023
1 parent 625128c commit 17ac479
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions tools/cpp/cc_configure.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ cc_autoconf = repository_rule(
"CPLUS_INCLUDE_PATH",
"DEVELOPER_DIR",
"GCOV",
"LIBTOOL",
"HOMEBREW_RUBY_PATH",
"SYSTEMROOT",
"USER",
Expand Down
2 changes: 1 addition & 1 deletion tools/cpp/unix_cc_configure.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ def configure_unix_toolchain(repository_ctx, cpu_value, overriden_tools):
)
if darwin:
overriden_tools["gcc"] = "cc_wrapper.sh"
overriden_tools["ar"] = "/usr/bin/libtool"
overriden_tools["ar"] = _find_generic(repository_ctx, "libtool", "LIBTOOL", overriden_tools)
auto_configure_warning_maybe(repository_ctx, "CC used: " + str(cc))
tool_paths = _get_tool_paths(repository_ctx, overriden_tools)
cc_toolchain_identifier = escape_string(get_env_var(
Expand Down

0 comments on commit 17ac479

Please sign in to comment.