Skip to content

Use the Apple C++ toolchain on macOS - #1108

Merged
aiuto merged 1 commit into
bazelbuild:mainfrom
aiuto:cc_mac
Nov 25, 2026
Merged

aiuto merged 1 commit into
bazelbuild:mainfrom
aiuto:cc_mac

Conversation

@aiuto

@aiuto aiuto commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

On macOS, toolchain resolution picks rules_cc's generic local_config_cc toolchain because apple_support is only a transitive dependency. With current Xcode, C++ targets then fail with "absolute path inclusion(s) found" for SDKSettings.json, so bazel test //tests/... cannot build the C++ test fixtures.

  • Add apple_support as a dev dependency of the root module, which does not affect users of the released module.
  • Add it to the examples that compile C/C++.
  • In examples/rpm/debuginfo, load cc_binary from rules_cc, since Bazel 9 no longer provides it as a builtin.

On macOS, toolchain resolution picked rules_cc's generic local_config_cc
toolchain because apple_support was only a transitive dependency. With
current Xcode that fails with "absolute path inclusion(s) found" for
SDKSettings.json, so C++ tests could not build.

Add apple_support as a dev dependency of the root module and as a
dependency of the examples that compile C/C++. Also load cc_binary from
rules_cc in examples/rpm/debuginfo, which Bazel 9 no longer provides
as a builtin.
@aiuto
aiuto requested a review from cgrindel as a code owner November 25, 2026 05:55
@aiuto
aiuto merged commit b0ef635 into bazelbuild:main Nov 25, 2026
6 checks passed
@aiuto
aiuto deleted the cc_mac branch November 25, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants