From 6fe540959da5e8b945f6629ccf5d2658307f54e4 Mon Sep 17 00:00:00 2001 From: fighet-parnet Date: Tue, 18 Jul 2023 08:44:24 -0400 Subject: [PATCH] Use llvm@15 linker/ar/nm --- bazel/toolchain/BUILD.bazel | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bazel/toolchain/BUILD.bazel b/bazel/toolchain/BUILD.bazel index bbc44f79dd..aaed5de087 100644 --- a/bazel/toolchain/BUILD.bazel +++ b/bazel/toolchain/BUILD.bazel @@ -279,7 +279,7 @@ cc_toolchain_config( # NOTE: building with `libtool` does not work on macOS due to lack of # support in the `configure_make` rule provided by `rules_foreign_cc`. # Therefore, we require setting `ar` as the archiver tool on macOS. - ar = "/usr/bin/ar", + ar = "/usr/local/opt/llvm@15/bin/llvm-ar", # By default, Bazel passes the `rcsD` flags to `ar`, but macOS's `ar` # implementation doesn't support `D`. We remove it with this attribute # and corresponding `ar_flags_feature` in `cfg.bzl`. @@ -288,7 +288,8 @@ cc_toolchain_config( cc = "/usr/local/opt/llvm@15/bin/clang", compiler = "clang", compiler_version = "//:clang_version", - ld = "/usr/bin/ld", + ld = "/usr/local/opt/llvm@15/bin/llvm-lld", + nm = "/usr/local/opt/llvm@15/bin/llvm-nm", sys_includes = [ "/usr/local/Cellar/llvm@15/15.0.7/lib/clang/15.0.7/include", "/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include",