Skip to content

Commit 2d42925

Browse files
fmeumcopybara-github
authored andcommitted
Define cc-compiler-darwin in Xcode toolchain
Previously, if the xcode_locator failed and cc_autoconf_toolchain used the non-Xcode C++ toolchain as a fallback, its reference to `@local_config_cc//:cc-compiler-darwin`, where darwin is the legacy cpu value for x86_64 macOS, would be invalid. Fixes bazelbuild#14459 Closes bazelbuild#14796. PiperOrigin-RevId: 451860477 Change-Id: Iec115f600ebb7ac0786b2169276d25e3ff5d54bf
1 parent 4c3219e commit 2d42925

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tools/osx/crosstool/BUILD.tpl

+8
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ cc_toolchain_suite(
8080
for arch in OSX_TOOLS_ARCHS
8181
]
8282

83+
# When xcode_locator fails and causes cc_autoconf_toolchains to fall back
84+
# to the non-Xcode C++ toolchain, it uses the legacy cpu value to refer to
85+
# the toolchain, which is "darwin" for x86_64 macOS.
86+
alias(
87+
name = "cc-compiler-darwin",
88+
actual = ":cc-compiler-darwin_x86_64",
89+
)
90+
8391
[
8492
cc_toolchain_config(
8593
name = arch,

0 commit comments

Comments
 (0)