diff --git a/tools/cpp/cc_configure.bzl b/tools/cpp/cc_configure.bzl index 6d0bca10dab559..9dd40dc10862da 100644 --- a/tools/cpp/cc_configure.bzl +++ b/tools/cpp/cc_configure.bzl @@ -169,6 +169,7 @@ cc_autoconf = repository_rule( "CPLUS_INCLUDE_PATH", "DEVELOPER_DIR", "GCOV", + "LIBTOOL", "HOMEBREW_RUBY_PATH", "SYSTEMROOT", "USER", diff --git a/tools/cpp/unix_cc_configure.bzl b/tools/cpp/unix_cc_configure.bzl index bfb37bddb4c203..9e19954c604fb7 100644 --- a/tools/cpp/unix_cc_configure.bzl +++ b/tools/cpp/unix_cc_configure.bzl @@ -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(