Skip to content

Commit

Permalink
Find libtool when using BAZEL_USE_CPP_ONLY_TOOLCHAIN.
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 bazelbuild#16009.

Closes bazelbuild#16010.

PiperOrigin-RevId: 503922158
Change-Id: I64392ada951938d612dd0b28141e6b2e4ee6952c
  • Loading branch information
uri-canva authored and copybara-github committed Jan 23, 2023
1 parent de062a6 commit 3c47b47
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 @@ -170,6 +170,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 3c47b47

Please sign in to comment.