toolchains_llvm
toolchains_llvm copied to clipboard
Apple Silicon toolchain support
I just got an M1 MacBook Pro today, and am looking into how to use this project to generate arm64 binaries (for the record: everything works fine using this project to generate x86_64 binaries, which then run under Rosetta).
In the Apple Developer Documentation, they make it out to be as simple as passing a -target
flag to the C compiler, though I'm sure it'll be more work to do the same thing in Bazel.
https://developer.apple.com/documentation/apple-silicon/building-a-universal-macos-binary
Have anyone put thought or time into how this project might be extended to support generating arm64 binaries on M1 Macs? I'm probably going to be spending some time getting this working, and I'd love any tips, ideas, or places to start.
I thought about this a bit while working on #85.
I think there are actually two separate things:
- using
clang
compiled for x86_64 to produce binaries for arm64 (i.e. cross compiling) - using
clang
compiled for arm64 to produce binaries for arm64
I think the first can be done with the feature #85 adds but I also think it's really the second thing that you'd want when running macOS on ARM (so that clang
doesn't needlessly have to run through Rosetta).
To add support for arm64 darwin host platforms, we'd need to:
- update parts of
configure.bzl
that hardcode the CPU constraints tox86_64
- we can either parameterize these over the current CPU or just add entries for every host CPU that we want to support (as we do for OSes – we always have
macOS
andlinux
toolchains regardless of the OS of the host platform; we let toolchain resolution pick the right one) - I'm inclined to just add entries for all the host CPUs we want to support since I don't know of a good way to determine the CPU type of the host from a repo rule (an
alias
on aselect
on the CPU or just runningarch
are the two ways that come to mind, both of which seem bad); users who aren't using toolchain resolution yet won't have their setups broken since we can add the appropriate entries to thetoolchain_suite
- this has the (odd but not bad) side-effect of letting you "choose" to use x86_64 clang on an M1 mac by running
bazel
under Rosetta, I think
- this has the (odd but not bad) side-effect of letting you "choose" to use x86_64 clang on an M1 mac by running
- we can either parameterize these over the current CPU or just add entries for every host CPU that we want to support (as we do for OSes – we always have
- update
cc_toolchain_config
to take ahost_cpu
arg- at a glance, I think this only really affects the
host_system_name
, and the defaulttarget_system_name
,target_cpu
,abi_version
, andabi_libc_version
- at a glance, I think this only really affects the
-
sysroot.bzl
might need some changes depending on whether the sysroots for arm64 macOS installs are any different - have
llvm_distributions.bzl
grow entries for arm64 macOS (more on this below) - change
BUILD.tpl
to matchconfigure.bzl
And I think that should be about it.
I think the bigger obstacle right now is that LLVM doesn't publish binaries for arm64 macOS (even though it's definitely possible to build LLVM for arm64 macOS). This effectively means that you'd have to provide your own download URL to to llvm_toolchain
.
Adding tests for this in CI will also be tricky since (afaik) GitHub Actions doesn't yet have ARM worker machines let alone macOS ARM worker machines but that's okay.
Another question is whether we'd want to support creating universal binaries on macOS; I think it makes sense not to default to doing so (users can opt into this by setting some --copts
or adding some extra_compile_flags
with the features in #85 for now; eventually we can make it an option on llvm_toolchain
if there's interest).
@jez I'm happy to try to put together these changes if you're willing to test (I don't have access to an arm64 macOS machine).
I’m more than happy to test! Do you have a sense of when you’d have time to work on this?
Also: I think that even being able to produce arm64 binaries would be an improvement, even if they were built by x86_64 clang. I see that #85 is a draft—is that something you’d like me to test? Or is there something else holding it back from landing?
Okay! I put together a thing that uses #85 to set up a toolchain for arm64 (still x86_64 based so it's cross-compiling).
It took a little doing; I'm not on macOS 11 so my sysroot didn't have the right stuff and it took me a while to realize that the ld
that ships in LLVM releases doesn't have support for the tbd
(TAPI) files that newer macOS SDKs ship. I ended up having to use lld
as the linker; I'm not sure this is totally right:
# newer macOS SDKs use `.tbd` files in their sysroots; `lld` has support for this
# (on recent versions) but `ld` (that ships in the LLVM releases) does not
#
# so, we need to specify that we want to use `lld`
#
# historically, we have not done this for macOS by default because of incomplete
# support for Mach-O in `lld` but newer version seem to have good support.
"extra_linker_flags": ["-fuse-ld=lld"],
I'd love to know what Apple clang
does (just the output of g++ -v -xc++ - <<<"int main() { }"
on an M1 machine should give it away I think).
But anyways, with the above, it does get all the way through linking on my x86_64 macOS machine. I can't actually run the generated binaries but hopefully they do actually work 🤞.
I've attached the workspace I put together to this comment.
-
bazel run //:test --config=x86
to check that the regular oldx86_64 -> x86_64
toolchain works, etc. -
bazel build //:test --config=arm64
to make thex86_64 -> arm64
toolchain can generate binaries -
bazel run //:test --config=arm64
to make sure the binaries emitted can actually run on arm64
In theory running bazel run //:test
(without any --config
to manually set the target platform) should pick up the arm64 toolchain and use it, depending on what constraints Bazel gives M1 machines. I have no idea how this interacts with Rosetta though; bazel build //:test --toolchain_resolution_debug
should give us some hints.
@jez re: your other questions:
I should have time to try to get the arm64 -> arm64
toolchain working over the weekend; assuming ^ works, that should be fairly straight-forward. The trickiest part will probably be finding/building an arm64 LLVM toolchain to use.
#85 is still a draft because it builds on #75 which hasn't yet been merged and because it's missing some docs and polish; I wanted to solicit some feedback about some of the design choices in that PR before cleaning it up. It is more or less functional though.
I'd love to know what Apple
clang
does (just the output ofg++ -v -xc++ - <<<"int main() { }"
on an M1 machine should give it away I think).
Here's the output:
I'll test that workspace out now and see what happens.
Here's the output:
Thanks! Can you run /Library/Developer/CommandLineTools/usr/bin/ld -v
also? I'm pretty sure it's just ld64
but just in case.
❯ /Library/Developer/CommandLineTools/usr/bin/ld -v
@(#)PROGRAM:ld PROJECT:ld64-650.9
BUILD 13:09:13 May 28 2021
configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em
LTO support using: LLVM version 12.0.5, (clang-1205.0.22.11) (static support for 27, runtime is 27)
TAPI support using: Apple TAPI version 12.0.5 (tapi-1205.0.7.1)
is the @macos-11.3-sdk//
repo basically the same set of files I have at /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
, judging from the output.log above?
yup, exactly
I had to grab it externally because I'm on an older version of macOS that doesn't have an SDK with the right stuff to build for arm64
but for host arm64 toolchains (as in arm64 -> arm64
) we shouldn't actually need to grab it; like we do with the other host toolchains, we can just assume what's on the host system actually works when you're targeting the host system
~/stripe/sandbox/rrbutani-workspace 19s
❯ ./bazel run //:test --config=x86
Starting local Bazel server and connecting to it...
ERROR: /private/var/tmp/_bazel/e9cb4153e0861999826e8879b02ae2cc/external/local_config_cc/BUILD:48:19: in cc_toolchain_suite rule @local_config_cc//:toolchain: cc_toolchain_suite '@local_config_cc//:toolchain' does not contain a toolchain for cpu 'darwin'
ERROR: Analysis of target '//:test' failed; build aborted: Analysis of target '@local_config_cc//:toolchain' failed
INFO: Elapsed time: 69.390s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (16 packages loaded, 61 targets configured)
FAILED: Build did NOT complete successfully (16 packages loaded, 61 targets configured)
~/stripe/sandbox/rrbutani-workspace
❯ ./bazel --version
bazel 4.2.1
(I had to make a slight change to the repo, which is to make it use a script that has contents identical to this:
https://github.com/jez/ragel-bison-parser-sandbox/blob/master/bazel
because our company laptops prevent us from installing bazelisk) but otherwise the above is the result of running things.
Interestingly enough, that's the same error I get when trying to build a normal bazel project on my macbook. For example this tiny project shows the same problems.
hmm
Does /private/var/tmp/_bazel/e9cb4153e0861999826e8879b02ae2cc/external/local_config_cc/BUILD:48
look like:
cc_toolchain_suite(
name = "toolchain",
toolchains = {
"k8|clang": ":cc-clang-linux",
"darwin|clang": ":cc-clang-darwin",
"k8": ":cc-clang-linux",
"darwin": ":cc-clang-darwin",
},
)
for you?
oh whoops, nvm; I totally missed that that's @local_config_cc
It's not clear to me why it's even analyzing @local_config_cc//:toolchain
; can you post what bazel build //:test --toolchain_resolution_debug
prints out?
It's not clear to me why it's even analyzing
@local_config_cc//:toolchain
; can you post whatbazel build //:test --toolchain_resolution_debug
prints out?
~/stripe/sandbox/rrbutani-workspace
❯ bazel build //:test --toolchain_resolution_debug
INFO: Build options --platforms and --toolchain_resolution_debug have changed, discarding analysis cache.
INFO: ToolchainResolution: Type @bazel_tools//tools/cpp:toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @llvm_toolchain//:cc-clang-linux; mismatching values: linux
INFO: ToolchainResolution: Type @bazel_tools//tools/cpp:toolchain_type: target platform @local_config_platform//:host: execution @local_config_platform//:host: Selected toolchain @llvm_toolchain//:cc-clang-darwin
INFO: ToolchainResolution: Type @bazel_tools//tools/cpp:toolchain_type: target platform @local_config_platform//:host: Rejected toolchain //:clang-darwin-arm64-toolchain; mismatching values: arm64
INFO: ToolchainResolution: Type @bazel_tools//tools/cpp:toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @local_config_cc//:cc-compiler-armeabi-v7a; mismatching values: arm, android
INFO: ToolchainResolution: Target platform @local_config_platform//:host: Selected execution platform @local_config_platform//:host, type @bazel_tools//tools/cpp:toolchain_type -> toolchain @llvm_toolchain//:cc-clang-darwin
INFO: ToolchainResolution: Target platform @local_config_platform//:host: Selected execution platform @local_config_platform//:host,
INFO: ToolchainResolution: Target platform @local_config_platform//:host: Selected execution platform @local_config_platform//:host,
INFO: ToolchainResolution: Target platform @local_config_platform//:host: Selected execution platform @local_config_platform//:host,
ERROR: /private/var/tmp/_bazel/e9cb4153e0861999826e8879b02ae2cc/external/local_config_cc/BUILD:48:19: in cc_toolchain_suite rule @local_config_cc//:toolchain: cc_toolchain_suite '@local_config_cc//:toolchain' does not contain a toolchain for cpu 'darwin'
ERROR: Analysis of target '//:test' failed; build aborted: Analysis of target '@local_config_cc//:toolchain' failed
INFO: Elapsed time: 0.924s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 60 targets configured)
Also in your original post you mentioned that you have an x86_64 -> x86_64
setup working; did you have to manually set your host platform or change anything toolchain related to get that to work?
Also in your original post you mentioned that you have an
x86_64 -> x86_64
setup working; did you have to manually set your host platform or change anything toolchain related to get that to work?
Yeah, overnight that seems to have stopped working. I can't explain that.
It's not clear to me why it's even analyzing
@local_config_cc//:toolchain
; can you post whatbazel build //:test --toolchain_resolution_debug
prints out?~/stripe/sandbox/rrbutani-workspace ❯ bazel build //:test --toolchain_resolution_debug INFO: Build options --platforms and --toolchain_resolution_debug have changed, discarding analysis cache. INFO: ToolchainResolution: Type @bazel_tools//tools/cpp:toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @llvm_toolchain//:cc-clang-linux; mismatching values: linux INFO: ToolchainResolution: Type @bazel_tools//tools/cpp:toolchain_type: target platform @local_config_platform//:host: execution @local_config_platform//:host: Selected toolchain @llvm_toolchain//:cc-clang-darwin INFO: ToolchainResolution: Type @bazel_tools//tools/cpp:toolchain_type: target platform @local_config_platform//:host: Rejected toolchain //:clang-darwin-arm64-toolchain; mismatching values: arm64 INFO: ToolchainResolution: Type @bazel_tools//tools/cpp:toolchain_type: target platform @local_config_platform//:host: Rejected toolchain @local_config_cc//:cc-compiler-armeabi-v7a; mismatching values: arm, android INFO: ToolchainResolution: Target platform @local_config_platform//:host: Selected execution platform @local_config_platform//:host, type @bazel_tools//tools/cpp:toolchain_type -> toolchain @llvm_toolchain//:cc-clang-darwin INFO: ToolchainResolution: Target platform @local_config_platform//:host: Selected execution platform @local_config_platform//:host, INFO: ToolchainResolution: Target platform @local_config_platform//:host: Selected execution platform @local_config_platform//:host, INFO: ToolchainResolution: Target platform @local_config_platform//:host: Selected execution platform @local_config_platform//:host, ERROR: /private/var/tmp/_bazel/e9cb4153e0861999826e8879b02ae2cc/external/local_config_cc/BUILD:48:19: in cc_toolchain_suite rule @local_config_cc//:toolchain: cc_toolchain_suite '@local_config_cc//:toolchain' does not contain a toolchain for cpu 'darwin' ERROR: Analysis of target '//:test' failed; build aborted: Analysis of target '@local_config_cc//:toolchain' failed INFO: Elapsed time: 0.924s INFO: 0 processes. FAILED: Build did NOT complete successfully (0 packages loaded, 60 targets configured)
That's odd; toolchain resolution happens exactly as we'd expect (it picks the x86 clang toolchain for macOS) but it still pulls in @local_config_cc
😕.
Can you try running bazel cquery 'deps(//:test)' --output=graph --config=x86
? It should at least tell us what's pulling it in.
@local_config_cc//:toolchain
shouldn't be broken though :-/
(actually the contents of /private/var/tmp/_bazel/e9cb4153e0861999826e8879b02ae2cc/external/local_config_cc/BUILD
would also be interesting to look at)
local_config_cc/BUILD
# Copyright 2016 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This becomes the BUILD file for @local_config_cc// under non-BSD unixes.
package(default_visibility = ["//visibility:public"])
load(":cc_toolchain_config.bzl", "cc_toolchain_config")
load(":armeabi_cc_toolchain_config.bzl", "armeabi_cc_toolchain_config")
load("@rules_cc//cc:defs.bzl", "cc_toolchain", "cc_toolchain_suite")
licenses(["notice"]) # Apache 2.0
cc_library(
name = "malloc",
)
filegroup(
name = "empty",
srcs = [],
)
filegroup(
name = "cc_wrapper",
srcs = ["cc_wrapper.sh"],
)
filegroup(
name = "compiler_deps",
srcs = glob(["extra_tools/**"], allow_empty = True) + [":builtin_include_directory_paths",
":cc_wrapper"],
)
# This is the entry point for --crosstool_top. Toolchains are found
# by lopping off the name of --crosstool_top and searching for
# the "${CPU}" entry in the toolchains attribute.
cc_toolchain_suite(
name = "toolchain",
toolchains = {
"darwin_arm64|clang": ":cc-compiler-darwin_arm64",
"darwin_arm64": ":cc-compiler-darwin_arm64",
"armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a",
"armeabi-v7a": ":cc-compiler-armeabi-v7a",
},
)
cc_toolchain(
name = "cc-compiler-darwin_arm64",
toolchain_identifier = "local",
toolchain_config = ":local",
all_files = ":compiler_deps",
ar_files = ":compiler_deps",
as_files = ":compiler_deps",
compiler_files = ":compiler_deps",
dwp_files = ":empty",
linker_files = ":compiler_deps",
objcopy_files = ":empty",
strip_files = ":empty",
supports_param_files = 1,
module_map = ":module.modulemap",
)
cc_toolchain_config(
name = "local",
cpu = "darwin_arm64",
compiler = "clang",
toolchain_identifier = "local",
host_system_name = "local",
target_system_name = "local",
target_libc = "macosx",
abi_version = "local",
abi_libc_version = "local",
cxx_builtin_include_directories = ["/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include",
"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include",
"/Library/Developer/CommandLineTools/usr/include",
"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks",
"/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/share",
"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1"],
tool_paths = {"ar": "/usr/bin/libtool",
"ld": "/usr/bin/ld",
"llvm-cov": "None",
"cpp": "/usr/bin/cpp",
"gcc": "cc_wrapper.sh",
"dwp": "/usr/bin/dwp",
"gcov": "/usr/bin/gcov",
"nm": "/usr/bin/nm",
"objcopy": "/usr/bin/objcopy",
"objdump": "/usr/bin/objdump",
"strip": "/usr/bin/strip"},
compile_flags = ["-U_FORTIFY_SOURCE",
"-fstack-protector",
"-Wall",
"-Wthread-safety",
"-Wself-assign",
"-fcolor-diagnostics",
"-fno-omit-frame-pointer"],
opt_compile_flags = ["-g0",
"-O2",
"-D_FORTIFY_SOURCE=1",
"-DNDEBUG",
"-ffunction-sections",
"-fdata-sections"],
dbg_compile_flags = ["-g"],
cxx_flags = ["-std=c++0x"],
link_flags = ["-undefined",
"dynamic_lookup",
"-headerpad_max_install_names"],
link_libs = ["-lstdc++",
"-lm"],
opt_link_flags = [],
unfiltered_compile_flags = ["-no-canonical-prefixes",
"-Wno-builtin-macro-redefined",
"-D__DATE__=\"redacted\"",
"-D__TIMESTAMP__=\"redacted\"",
"-D__TIME__=\"redacted\""],
coverage_compile_flags = ["-fprofile-instr-generate", "-fcoverage-mapping"],
coverage_link_flags = ["-fprofile-instr-generate"],
supports_start_end_lib = False,
)
# Android tooling requires a default toolchain for the armeabi-v7a cpu.
cc_toolchain(
name = "cc-compiler-armeabi-v7a",
toolchain_identifier = "stub_armeabi-v7a",
toolchain_config = ":stub_armeabi-v7a",
all_files = ":empty",
ar_files = ":empty",
as_files = ":empty",
compiler_files = ":empty",
dwp_files = ":empty",
linker_files = ":empty",
objcopy_files = ":empty",
strip_files = ":empty",
supports_param_files = 1,
)
armeabi_cc_toolchain_config(name = "stub_armeabi-v7a")
and the other one:
❯ bazel cquery 'deps(//:test)' --output=graph --config=x86
INFO: Build options --platforms and --toolchain_resolution_debug have changed, discarding analysis cache.
ERROR: /private/var/tmp/_bazel/e9cb4153e0861999826e8879b02ae2cc/external/local_config_cc/BUILD:48:19: in cc_toolchain_suite rule @local_config_cc//:toolchain: cc_toolchain_suite '@local_config_cc//:toolchain' does not contain a toolchain for cpu 'darwin'
ERROR: Analysis of target '//:test' failed; build aborted: Analysis of target '@local_config_cc//:toolchain' failed
INFO: Elapsed time: 0.791s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 61 targets configured)
❯ bazel cquery 'deps(//:test)' --output=graph --config=x86 INFO: Build options --platforms and --toolchain_resolution_debug have changed, discarding analysis cache. ERROR: /private/var/tmp/_bazel/e9cb4153e0861999826e8879b02ae2cc/external/local_config_cc/BUILD:48:19: in cc_toolchain_suite rule @local_config_cc//:toolchain: cc_toolchain_suite '@local_config_cc//:toolchain' does not contain a toolchain for cpu 'darwin' ERROR: Analysis of target '//:test' failed; build aborted: Analysis of target '@local_config_cc//:toolchain' failed INFO: Elapsed time: 0.791s INFO: 0 processes. FAILED: Build did NOT complete successfully (0 packages loaded, 61 targets configured)
oh whoops; does it get any further if you add --keep_going
?
wait ^ makes sense actually; there isn't an x86_64 darwin toolchain in @local_cc_config
for some reason I was under the impression that Bazel was running under Rosetta in which case there would be, I think
does the error go away if you don't specify --config=x86
?
oh whoops; does it get any further if you add
--keep_going
?
does the error go away if you don't specify
--config=x86
?
I get the same output for all combinations of --keep_going
and --config={x86,arm}
❯ bazel cquery 'deps(//:test)' --output=graph --config=arm64 --keep_going
INFO: Build option --platforms has changed, discarding analysis cache.
ERROR: /private/var/tmp/_bazel/e9cb4153e0861999826e8879b02ae2cc/external/local_config_cc/BUILD:48:19: in cc_toolchain_suite rule @local_config_cc//:toolchain: cc_toolchain_suite '@local_config_cc//:toolchain' does not contain a toolchain for cpu 'darwin'
WARNING: errors encountered while analyzing target '//:test': it will not be built
INFO: Analyzed target //:test (1 packages loaded, 4140 targets configured).
INFO: Found 0 targets...
INFO: Empty query results
digraph mygraph {
node [shape=box];
}
ERROR: command succeeded, but not all targets were analyzed
INFO: Elapsed time: 16.547s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
is the output when --keep_going
is present
😕
how about with --host_cpu=darwin_arm64
and/or --cpu=darwin_arm64
?
Looks like that works?
~/stripe/sandbox/rrbutani-workspace
❯ bazel build //:test --cpu=darwin_arm64 --config=arm64
INFO: Build option --cpu has changed, discarding analysis cache.
INFO: Analyzed target //:test (0 packages loaded, 4144 targets configured).
INFO: Found 1 target...
INFO: From Linking test:
ld64.lld: warning: ignoring unknown argument: -headerpad_max_install_names
ld64.lld: warning: -sdk_version is required when emitting min version load command. Setting sdk version to match provided min version
Target //:test up-to-date:
bazel-bin/test
INFO: Elapsed time: 15.586s, Critical Path: 11.68s
INFO: 5 processes: 3 internal, 2 darwin-sandbox.
INFO: Build completed successfully, 5 total actions
~/stripe/sandbox/rrbutani-workspace 15s
❯ file bazel-bin/test
bazel-bin/test: Mach-O 64-bit executable arm64
oh neat
that's super weird though; I thought ^ wouldn't be necessary anymore 😕
Does just --host_cpu=darwin_arm64
also work?
Neither of those works
~/stripe/sandbox/rrbutani-workspace
❯ bazel build //:test --host_cpu=darwin_arm64
INFO: Build options --cpu, --host_cpu, and --platforms have changed, discarding analysis cache.
ERROR: /private/var/tmp/_bazel/e9cb4153e0861999826e8879b02ae2cc/external/local_config_cc/BUILD:48:19: in cc_toolchain_suite rule @local_config_cc//:toolchain: cc_toolchain_suite '@local_config_cc//:toolchain' does not contain a toolchain for cpu 'darwin'
ERROR: Analysis of target '//:test' failed; build aborted: Analysis of target '@local_config_cc//:toolchain' failed
INFO: Elapsed time: 1.699s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 60 targets configured)
~/stripe/sandbox/rrbutani-workspace
❯ bazel build //:test --host_cpu=darwin_arm64 --config=arm64
INFO: Build option --platforms has changed, discarding analysis cache.
ERROR: /private/var/tmp/_bazel/e9cb4153e0861999826e8879b02ae2cc/external/local_config_cc/BUILD:48:19: in cc_toolchain_suite rule @local_config_cc//:toolchain: cc_toolchain_suite '@local_config_cc//:toolchain' does not contain a toolchain for cpu 'darwin'
ERROR: Analysis of target '//:test' failed; build aborted: Analysis of target '@local_config_cc//:toolchain' failed
INFO: Elapsed time: 1.270s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 4133 targets configured)
You might also be curious to see the cquery output with --cpu=darwin_arm64
Click to expand
❯ bazel cquery 'deps(//:test)' --output=graph --config=arm64 --keep_going --cpu=darwin_arm64
INFO: Build options --cpu and --host_cpu have changed, discarding analysis cache.
INFO: Analyzed target //:test (0 packages loaded, 4144 targets configured).
INFO: Found 1 target...
digraph mygraph {
node [shape=box];
"//:test (f7c5632)"
"//:test (f7c5632)" -> "//:apple-silicon (f7c5632)"
"//:test (f7c5632)" -> "//:clang-darwin-arm64-toolchain (HOST)"
"//:test (f7c5632)" -> "//:test.cc (null)"
"//:test (f7c5632)" -> "@bazel_tools//tools/cpp:grep-includes (HOST)"
"//:test (f7c5632)" -> "@bazel_tools//tools/cpp:malloc (f7c5632)"
"//:test (f7c5632)" -> "@bazel_tools//tools/cpp:toolchain (f7c5632)"
"//:test (f7c5632)" -> "@bazel_tools//tools/cpp:toolchain_type (f7c5632)"
"//:test (f7c5632)" -> "@bazel_tools//tools/def_parser:def_parser (HOST)"
"//:test (f7c5632)" -> "@local_config_platform//:host (f7c5632)"
"@bazel_tools//tools/def_parser:def_parser (HOST)"
"@bazel_tools//tools/def_parser:def_parser (HOST)" -> "@bazel_tools//src/conditions:host_windows (HOST)"
"@bazel_tools//tools/def_parser:def_parser (HOST)" -> "@bazel_tools//tools/def_parser:no_op.bat (null)"
"@bazel_tools//tools/def_parser:def_parser (HOST)" -> "@local_config_platform//:host (HOST)"
"@bazel_tools//tools/def_parser:no_op.bat (null)"
"@bazel_tools//src/conditions:host_windows (HOST)"
"@bazel_tools//src/conditions:host_windows (HOST)" -> "@local_config_platform//:host (HOST)"
"@bazel_tools//tools/cpp:malloc (f7c5632)"
"@bazel_tools//tools/cpp:malloc (f7c5632)" -> "//:apple-silicon (f7c5632)"
"@bazel_tools//tools/cpp:malloc (f7c5632)" -> "//:clang-darwin-arm64-toolchain (HOST)"
"@bazel_tools//tools/cpp:malloc (f7c5632)" -> "@bazel_tools//tools/cpp:grep-includes (HOST)"
"@bazel_tools//tools/cpp:malloc (f7c5632)" -> "@bazel_tools//tools/cpp:toolchain (f7c5632)"
"@bazel_tools//tools/cpp:malloc (f7c5632)" -> "@bazel_tools//tools/cpp:toolchain_type (f7c5632)"
"@bazel_tools//tools/cpp:malloc (f7c5632)" -> "@local_config_platform//:host (f7c5632)"
"@bazel_tools//tools/cpp:toolchain_type (f7c5632)"
"@bazel_tools//tools/cpp:toolchain (f7c5632)"
"@bazel_tools//tools/cpp:toolchain (f7c5632)" -> "@local_config_cc//:toolchain (f7c5632)"
"@local_config_cc//:toolchain (f7c5632)"
"@local_config_cc//:toolchain (f7c5632)" -> "//:apple-silicon (f7c5632)"
"@local_config_cc//:toolchain (f7c5632)" -> "@local_config_cc//:cc-compiler-armeabi-v7a (f7c5632)"
"@local_config_cc//:toolchain (f7c5632)" -> "@local_config_cc//:cc-compiler-darwin_arm64 (f7c5632)"
"@local_config_cc//:toolchain (f7c5632)" -> "@local_config_platform//:host (f7c5632)"
"@local_config_cc//:cc-compiler-darwin_arm64 (f7c5632)"
"@local_config_cc//:cc-compiler-darwin_arm64 (f7c5632)" -> "//:apple-silicon (f7c5632)"
"@local_config_cc//:cc-compiler-darwin_arm64 (f7c5632)" -> "@bazel_tools//tools/build_defs/cc/whitelists/parse_headers_and_layering_check:disabling_parse_headers_and_layering_check_allowed (null)\n@bazel_tools//tools/build_defs/cc/whitelists/starlark_hdrs_check:loose_header_check_allowed_in_toolchain (null)"
"@local_config_cc//:cc-compiler-darwin_arm64 (f7c5632)" -> "@bazel_tools//tools/cpp:interface_library_builder (49db493)"
"@local_config_cc//:cc-compiler-darwin_arm64 (f7c5632)" -> "@bazel_tools//tools/cpp:link_dynamic_library (49db493)"
"@local_config_cc//:cc-compiler-darwin_arm64 (f7c5632)" -> "@local_config_cc//:compiler_deps (49db493)"
"@local_config_cc//:cc-compiler-darwin_arm64 (f7c5632)" -> "@local_config_cc//:empty (49db493)"
"@local_config_cc//:cc-compiler-darwin_arm64 (f7c5632)" -> "@local_config_cc//:local (f7c5632)"
"@local_config_cc//:cc-compiler-darwin_arm64 (f7c5632)" -> "@local_config_cc//:module.modulemap (null)"
"@local_config_cc//:cc-compiler-darwin_arm64 (f7c5632)" -> "@local_config_platform//:host (f7c5632)"
"@local_config_cc//:module.modulemap (null)"
"@local_config_cc//:local (f7c5632)"
"@local_config_cc//:local (f7c5632)" -> "//:apple-silicon (f7c5632)"
"@local_config_cc//:local (f7c5632)" -> "@local_config_platform//:host (f7c5632)"
"@local_config_cc//:compiler_deps (49db493)"
"@local_config_cc//:compiler_deps (49db493)" -> "@local_config_cc//:builtin_include_directory_paths (null)"
"@local_config_cc//:compiler_deps (49db493)" -> "@local_config_cc//:cc_wrapper (49db493)"
"@local_config_cc//:compiler_deps (49db493)" -> "@local_config_platform//:host (49db493)"
"@local_config_cc//:cc_wrapper (49db493)"
"@local_config_cc//:cc_wrapper (49db493)" -> "@local_config_cc//:cc_wrapper.sh (null)"
"@local_config_cc//:cc_wrapper (49db493)" -> "@local_config_platform//:host (49db493)"
"@local_config_cc//:cc_wrapper.sh (null)"
"@local_config_cc//:builtin_include_directory_paths (null)"
"@local_config_cc//:cc-compiler-armeabi-v7a (f7c5632)"
"@local_config_cc//:cc-compiler-armeabi-v7a (f7c5632)" -> "//:apple-silicon (f7c5632)"
"@local_config_cc//:cc-compiler-armeabi-v7a (f7c5632)" -> "@bazel_tools//tools/build_defs/cc/whitelists/parse_headers_and_layering_check:disabling_parse_headers_and_layering_check_allowed (null)\n@bazel_tools//tools/build_defs/cc/whitelists/starlark_hdrs_check:loose_header_check_allowed_in_toolchain (null)"
"@local_config_cc//:cc-compiler-armeabi-v7a (f7c5632)" -> "@bazel_tools//tools/cpp:interface_library_builder (49db493)"
"@local_config_cc//:cc-compiler-armeabi-v7a (f7c5632)" -> "@bazel_tools//tools/cpp:link_dynamic_library (49db493)"
"@local_config_cc//:cc-compiler-armeabi-v7a (f7c5632)" -> "@local_config_cc//:empty (49db493)"
"@local_config_cc//:cc-compiler-armeabi-v7a (f7c5632)" -> "@local_config_cc//:stub_armeabi-v7a (f7c5632)"
"@local_config_cc//:cc-compiler-armeabi-v7a (f7c5632)" -> "@local_config_platform//:host (f7c5632)"
"@local_config_cc//:stub_armeabi-v7a (f7c5632)"
"@local_config_cc//:stub_armeabi-v7a (f7c5632)" -> "//:apple-silicon (f7c5632)"
"@local_config_cc//:stub_armeabi-v7a (f7c5632)" -> "@local_config_platform//:host (f7c5632)"
"@local_config_platform//:host (f7c5632)"
"@local_config_platform//:host (f7c5632)" -> "@platforms//cpu:x86_64 (f7c5632)"
"@local_config_platform//:host (f7c5632)" -> "@platforms//os:osx (f7c5632)"
"@platforms//cpu:x86_64 (f7c5632)"
"@platforms//cpu:x86_64 (f7c5632)" -> "@platforms//cpu:cpu (f7c5632)"
"@local_config_cc//:empty (49db493)"
"@local_config_cc//:empty (49db493)" -> "@local_config_platform//:host (49db493)"
"@bazel_tools//tools/cpp:link_dynamic_library (49db493)"
"@bazel_tools//tools/cpp:link_dynamic_library (49db493)" -> "@bazel_tools//tools/cpp:link_dynamic_library.sh (null)"
"@bazel_tools//tools/cpp:link_dynamic_library (49db493)" -> "@local_config_platform//:host (49db493)"
"@bazel_tools//tools/cpp:interface_library_builder (49db493)"
"@bazel_tools//tools/cpp:interface_library_builder (49db493)" -> "@bazel_tools//tools/cpp:build_interface_so (null)"
"@bazel_tools//tools/cpp:interface_library_builder (49db493)" -> "@local_config_platform//:host (49db493)"
"@local_config_platform//:host (49db493)"
"@local_config_platform//:host (49db493)" -> "@platforms//cpu:x86_64 (49db493)"
"@local_config_platform//:host (49db493)" -> "@platforms//os:osx (49db493)"
"@platforms//os:osx (49db493)"
"@platforms//os:osx (49db493)" -> "@platforms//os:os (49db493)"
"@platforms//os:os (49db493)"
"@platforms//cpu:x86_64 (49db493)"
"@platforms//cpu:x86_64 (49db493)" -> "@platforms//cpu:cpu (49db493)"
"@platforms//cpu:cpu (49db493)"
"@bazel_tools//tools/cpp:grep-includes (HOST)"
"@bazel_tools//tools/cpp:grep-includes (HOST)" -> "@bazel_tools//tools/cpp:grep-includes.sh (null)"
"@bazel_tools//tools/cpp:grep-includes (HOST)" -> "@local_config_platform//:host (HOST)"
"@bazel_tools//tools/cpp:grep-includes.sh (null)"
"//:test.cc (null)"
"//:clang-darwin-arm64-toolchain (HOST)"
"//:clang-darwin-arm64-toolchain (HOST)" -> "//:clang-darwin-arm64-config (HOST)\n@llvm_toolchain//:empty (HOST)"
"//:clang-darwin-arm64-toolchain (HOST)" -> "//:clang-darwin-arm64-toolchain-all-files (HOST)"
"//:clang-darwin-arm64-toolchain (HOST)" -> "//:clang-darwin-arm64-toolchain-archiver-files (HOST)"
"//:clang-darwin-arm64-toolchain (HOST)" -> "//:clang-darwin-arm64-toolchain-assembler-files (HOST)"
"//:clang-darwin-arm64-toolchain (HOST)" -> "//:clang-darwin-arm64-toolchain-compiler-files (HOST)"
"//:clang-darwin-arm64-toolchain (HOST)" -> "//:clang-darwin-arm64-toolchain-linker-files (HOST)"
"//:clang-darwin-arm64-toolchain (HOST)" -> "@bazel_tools//tools/build_defs/cc/whitelists/parse_headers_and_layering_check:disabling_parse_headers_and_layering_check_allowed (null)\n@bazel_tools//tools/build_defs/cc/whitelists/starlark_hdrs_check:loose_header_check_allowed_in_toolchain (null)"
"//:clang-darwin-arm64-toolchain (HOST)" -> "@bazel_tools//tools/cpp:interface_library_builder (HOST)"
"//:clang-darwin-arm64-toolchain (HOST)" -> "@bazel_tools//tools/cpp:link_dynamic_library (HOST)"
"//:clang-darwin-arm64-toolchain (HOST)" -> "@llvm_toolchain//:objcopy (HOST)"
"//:clang-darwin-arm64-toolchain (HOST)" -> "@local_config_platform//:host (HOST)"
"@llvm_toolchain//:objcopy (HOST)"
"@llvm_toolchain//:objcopy (HOST)" -> "@llvm_toolchain//:bin/llvm-objcopy (null)"
"@llvm_toolchain//:objcopy (HOST)" -> "@local_config_platform//:host (HOST)"
"@bazel_tools//tools/cpp:link_dynamic_library (HOST)"
"@bazel_tools//tools/cpp:link_dynamic_library (HOST)" -> "@bazel_tools//tools/cpp:link_dynamic_library.sh (null)"
"@bazel_tools//tools/cpp:link_dynamic_library (HOST)" -> "@local_config_platform//:host (HOST)"
"@bazel_tools//tools/cpp:link_dynamic_library.sh (null)"
"@bazel_tools//tools/cpp:interface_library_builder (HOST)"
"@bazel_tools//tools/cpp:interface_library_builder (HOST)" -> "@bazel_tools//tools/cpp:build_interface_so (null)"
"@bazel_tools//tools/cpp:interface_library_builder (HOST)" -> "@local_config_platform//:host (HOST)"
"@bazel_tools//tools/cpp:build_interface_so (null)"
"@bazel_tools//tools/build_defs/cc/whitelists/parse_headers_and_layering_check:disabling_parse_headers_and_layering_check_allowed (null)\n@bazel_tools//tools/build_defs/cc/whitelists/starlark_hdrs_check:loose_header_check_allowed_in_toolchain (null)"
"//:clang-darwin-arm64-toolchain-linker-files (HOST)"
"//:clang-darwin-arm64-toolchain-linker-files (HOST)" -> "//:clang-darwin-arm64-toolchain-linker_components (HOST)"
"//:clang-darwin-arm64-toolchain-linker-files (HOST)" -> "@llvm_toolchain//:cc_wrapper (HOST)"
"//:clang-darwin-arm64-toolchain-linker-files (HOST)" -> "@local_config_platform//:host (HOST)"
"//:clang-darwin-arm64-toolchain-compiler-files (HOST)"
"//:clang-darwin-arm64-toolchain-compiler-files (HOST)" -> "//:clang-darwin-arm64-toolchain-compiler_components (HOST)"
"//:clang-darwin-arm64-toolchain-compiler-files (HOST)" -> "@llvm_toolchain//:cc_wrapper (HOST)"
"//:clang-darwin-arm64-toolchain-compiler-files (HOST)" -> "@local_config_platform//:host (HOST)"
"//:clang-darwin-arm64-toolchain-assembler-files (HOST)"
"//:clang-darwin-arm64-toolchain-assembler-files (HOST)" -> "@llvm_toolchain//:as (HOST)"
"//:clang-darwin-arm64-toolchain-assembler-files (HOST)" -> "@llvm_toolchain//:cc_wrapper (HOST)"
"//:clang-darwin-arm64-toolchain-assembler-files (HOST)" -> "@local_config_platform//:host (HOST)"
"@llvm_toolchain//:as (HOST)"
"@llvm_toolchain//:as (HOST)" -> "@llvm_toolchain//:bin/clang (null)"
"@llvm_toolchain//:as (HOST)" -> "@llvm_toolchain//:bin/llvm-as (null)"
"@llvm_toolchain//:as (HOST)" -> "@local_config_platform//:host (HOST)"
"//:clang-darwin-arm64-toolchain-archiver-files (HOST)"
"//:clang-darwin-arm64-toolchain-archiver-files (HOST)" -> "@llvm_toolchain//:ar (HOST)"
"//:clang-darwin-arm64-toolchain-archiver-files (HOST)" -> "@llvm_toolchain//:cc_wrapper (HOST)"
"//:clang-darwin-arm64-toolchain-archiver-files (HOST)" -> "@local_config_platform//:host (HOST)"
"//:clang-darwin-arm64-toolchain-all-files (HOST)"
"//:clang-darwin-arm64-toolchain-all-files (HOST)" -> "//:clang-darwin-arm64-toolchain-all_components (HOST)"
"//:clang-darwin-arm64-toolchain-all-files (HOST)" -> "@llvm_toolchain//:cc_wrapper (HOST)"
"//:clang-darwin-arm64-toolchain-all-files (HOST)" -> "@local_config_platform//:host (HOST)"
"@llvm_toolchain//:cc_wrapper (HOST)"
"@llvm_toolchain//:cc_wrapper (HOST)" -> "@llvm_toolchain//:bin/cc_wrapper.sh (null)"
"@llvm_toolchain//:cc_wrapper (HOST)" -> "@local_config_platform//:host (HOST)"
"//:clang-darwin-arm64-toolchain-all_components (HOST)"
"//:clang-darwin-arm64-toolchain-all_components (HOST)" -> "//:clang-darwin-arm64-toolchain-compiler_components (HOST)"
"//:clang-darwin-arm64-toolchain-all_components (HOST)" -> "//:clang-darwin-arm64-toolchain-linker_components (HOST)"
"//:clang-darwin-arm64-toolchain-all_components (HOST)" -> "@llvm_toolchain//:binutils_components (HOST)"
"//:clang-darwin-arm64-toolchain-all_components (HOST)" -> "@local_config_platform//:host (HOST)"
"@llvm_toolchain//:binutils_components (HOST)"
"@llvm_toolchain//:binutils_components (HOST)" -> "@llvm_toolchain//:bin/ar (null)\n@llvm_toolchain//:bin/bugpoint (null)\n@llvm_toolchain//:bin/c-index-test (null)\n@llvm_toolchain//:bin/clang-12 (null)\n@llvm_toolchain//:bin/clang-apply-replacements (null)\n@llvm_toolchain//:bin/clang-change-namespace (null)\n@llvm_toolchain//:bin/clang-check (null)\n@llvm_toolchain//:bin/clang-cl (null)\n@llvm_toolchain//:bin/clang-doc (null)\n@llvm_toolchain//:bin/clang-extdef-mapping (null)\n@llvm_toolchain//:bin/clang-format (null)\n...and 96 more items"
"@llvm_toolchain//:binutils_components (HOST)" -> "@llvm_toolchain//:bin/cc_wrapper.sh (null)"
"@llvm_toolchain//:binutils_components (HOST)" -> "@llvm_toolchain//:bin/clang (null)"
"@llvm_toolchain//:binutils_components (HOST)" -> "@llvm_toolchain//:bin/clang++ (null)\n@llvm_toolchain//:bin/clang-cpp (null)"
"@llvm_toolchain//:binutils_components (HOST)" -> "@llvm_toolchain//:bin/ld (null)\n@llvm_toolchain//:bin/ld.gold (null)\n@llvm_toolchain//:bin/ld.lld (null)"
"@llvm_toolchain//:binutils_components (HOST)" -> "@llvm_toolchain//:bin/llvm-ar (null)"
"@llvm_toolchain//:binutils_components (HOST)" -> "@llvm_toolchain//:bin/llvm-as (null)"
"@llvm_toolchain//:binutils_components (HOST)" -> "@llvm_toolchain//:bin/llvm-objcopy (null)"
"@llvm_toolchain//:binutils_components (HOST)" -> "@local_config_platform//:host (HOST)"
"@llvm_toolchain//:bin/llvm-objcopy (null)"
"@llvm_toolchain//:bin/llvm-as (null)"
"@llvm_toolchain//:bin/cc_wrapper.sh (null)"
"@llvm_toolchain//:bin/ar (null)\n@llvm_toolchain//:bin/bugpoint (null)\n@llvm_toolchain//:bin/c-index-test (null)\n@llvm_toolchain//:bin/clang-12 (null)\n@llvm_toolchain//:bin/clang-apply-replacements (null)\n@llvm_toolchain//:bin/clang-change-namespace (null)\n@llvm_toolchain//:bin/clang-check (null)\n@llvm_toolchain//:bin/clang-cl (null)\n@llvm_toolchain//:bin/clang-doc (null)\n@llvm_toolchain//:bin/clang-extdef-mapping (null)\n@llvm_toolchain//:bin/clang-format (null)\n...and 96 more items"
"//:clang-darwin-arm64-toolchain-linker_components (HOST)"
"//:clang-darwin-arm64-toolchain-linker_components (HOST)" -> "@llvm_toolchain//:ar (HOST)"
"//:clang-darwin-arm64-toolchain-linker_components (HOST)" -> "@llvm_toolchain//:clang (HOST)"
"//:clang-darwin-arm64-toolchain-linker_components (HOST)" -> "@llvm_toolchain//:ld (HOST)"
"//:clang-darwin-arm64-toolchain-linker_components (HOST)" -> "@llvm_toolchain//:lib (HOST)"
"//:clang-darwin-arm64-toolchain-linker_components (HOST)" -> "@local_config_platform//:host (HOST)"
"//:clang-darwin-arm64-toolchain-linker_components (HOST)" -> "@macos-11.3-sdk//:sysroot (HOST)"
"@llvm_toolchain//:lib (HOST)"
"@llvm_toolchain//:lib (HOST)" -> "@llvm_toolchain//:lib/clang/12.0.0/lib/darwin/libclang_rt.cc_kext.a (null)\n@llvm_toolchain//:lib/clang/12.0.0/lib/darwin/libclang_rt.cc_kext_ios.a (null)\n@llvm_toolchain//:lib/clang/12.0.0/lib/darwin/libclang_rt.fuzzer_interceptors_ios.a (null)\n@llvm_toolchain//:lib/clang/12.0.0/lib/darwin/libclang_rt.fuzzer_interceptors_iossim.a (null)\n@llvm_toolchain//:lib/clang/12.0.0/lib/darwin/libclang_rt.fuzzer_interceptors_osx.a (null)\n...and 171 more items"
"@llvm_toolchain//:lib (HOST)" -> "@local_config_platform//:host (HOST)"
"@llvm_toolchain//:lib/clang/12.0.0/lib/darwin/libclang_rt.cc_kext.a (null)\n@llvm_toolchain//:lib/clang/12.0.0/lib/darwin/libclang_rt.cc_kext_ios.a (null)\n@llvm_toolchain//:lib/clang/12.0.0/lib/darwin/libclang_rt.fuzzer_interceptors_ios.a (null)\n@llvm_toolchain//:lib/clang/12.0.0/lib/darwin/libclang_rt.fuzzer_interceptors_iossim.a (null)\n@llvm_toolchain//:lib/clang/12.0.0/lib/darwin/libclang_rt.fuzzer_interceptors_osx.a (null)\n...and 171 more items"
"@llvm_toolchain//:ld (HOST)"
"@llvm_toolchain//:ld (HOST)" -> "@llvm_toolchain//:bin/ld (null)\n@llvm_toolchain//:bin/ld.gold (null)\n@llvm_toolchain//:bin/ld.lld (null)"
"@llvm_toolchain//:ld (HOST)" -> "@local_config_platform//:host (HOST)"
"@llvm_toolchain//:bin/ld (null)\n@llvm_toolchain//:bin/ld.gold (null)\n@llvm_toolchain//:bin/ld.lld (null)"
"@llvm_toolchain//:ar (HOST)"
"@llvm_toolchain//:ar (HOST)" -> "@llvm_toolchain//:bin/llvm-ar (null)"
"@llvm_toolchain//:ar (HOST)" -> "@local_config_platform//:host (HOST)"
"@llvm_toolchain//:bin/llvm-ar (null)"
"//:clang-darwin-arm64-toolchain-compiler_components (HOST)"
"//:clang-darwin-arm64-toolchain-compiler_components (HOST)" -> "@llvm_toolchain//:clang (HOST)"
"//:clang-darwin-arm64-toolchain-compiler_components (HOST)" -> "@llvm_toolchain//:include (HOST)"
"//:clang-darwin-arm64-toolchain-compiler_components (HOST)" -> "@local_config_platform//:host (HOST)"
"//:clang-darwin-arm64-toolchain-compiler_components (HOST)" -> "@macos-11.3-sdk//:sysroot (HOST)"
"@macos-11.3-sdk//:sysroot (HOST)"
"@macos-11.3-sdk//:sysroot (HOST)" -> "@local_config_platform//:host (HOST)"
"@macos-11.3-sdk//:sysroot (HOST)" -> "@macos-11.3-sdk//:usr/bin/cups-config (null)\[email protected]//:usr/bin/curl-config (null)\[email protected]//:usr/bin/krb5-config (null)\[email protected]//:usr/bin/ncurses5.4-config (null)\[email protected]//:usr/bin/net-snmp-config (null)\[email protected]//:usr/bin/pcap-config (null)\[email protected]//:usr/bin/php-config (null)\[email protected]//:usr/bin/xml2-config (null)\[email protected]//:usr/bin/xslt-config (null)\n...and 3388 more items"
"@macos-11.3-sdk//:usr/bin/cups-config (null)\[email protected]//:usr/bin/curl-config (null)\[email protected]//:usr/bin/krb5-config (null)\[email protected]//:usr/bin/ncurses5.4-config (null)\[email protected]//:usr/bin/net-snmp-config (null)\[email protected]//:usr/bin/pcap-config (null)\[email protected]//:usr/bin/php-config (null)\[email protected]//:usr/bin/xml2-config (null)\[email protected]//:usr/bin/xslt-config (null)\n...and 3388 more items"
"@llvm_toolchain//:include (HOST)"
"@llvm_toolchain//:include (HOST)" -> "@llvm_toolchain//:include/c++/v1/__availability (null)\n@llvm_toolchain//:include/c++/v1/__bit_reference (null)\n@llvm_toolchain//:include/c++/v1/__bits (null)\n@llvm_toolchain//:include/c++/v1/__bsd_locale_defaults.h (null)\n@llvm_toolchain//:include/c++/v1/__bsd_locale_fallbacks.h (null)\n@llvm_toolchain//:include/c++/v1/__config (null)\n@llvm_toolchain//:include/c++/v1/__cxxabi_config.h (null)\n@llvm_toolchain//:include/c++/v1/__debug (null)\n...and 363 more items"
"@llvm_toolchain//:include (HOST)" -> "@local_config_platform//:host (HOST)"
"@llvm_toolchain//:include/c++/v1/__availability (null)\n@llvm_toolchain//:include/c++/v1/__bit_reference (null)\n@llvm_toolchain//:include/c++/v1/__bits (null)\n@llvm_toolchain//:include/c++/v1/__bsd_locale_defaults.h (null)\n@llvm_toolchain//:include/c++/v1/__bsd_locale_fallbacks.h (null)\n@llvm_toolchain//:include/c++/v1/__config (null)\n@llvm_toolchain//:include/c++/v1/__cxxabi_config.h (null)\n@llvm_toolchain//:include/c++/v1/__debug (null)\n...and 363 more items"
"@llvm_toolchain//:clang (HOST)"
"@llvm_toolchain//:clang (HOST)" -> "@llvm_toolchain//:bin/clang (null)"
"@llvm_toolchain//:clang (HOST)" -> "@llvm_toolchain//:bin/clang++ (null)\n@llvm_toolchain//:bin/clang-cpp (null)"
"@llvm_toolchain//:clang (HOST)" -> "@local_config_platform//:host (HOST)"
"@llvm_toolchain//:bin/clang++ (null)\n@llvm_toolchain//:bin/clang-cpp (null)"
"@llvm_toolchain//:bin/clang (null)"
"//:clang-darwin-arm64-config (HOST)\n@llvm_toolchain//:empty (HOST)"
"//:clang-darwin-arm64-config (HOST)\n@llvm_toolchain//:empty (HOST)" -> "@local_config_platform//:host (HOST)"
"@local_config_platform//:host (HOST)"
"@local_config_platform//:host (HOST)" -> "@platforms//cpu:x86_64 (HOST)"
"@local_config_platform//:host (HOST)" -> "@platforms//os:osx (HOST)"
"@platforms//os:osx (HOST)"
"@platforms//os:osx (HOST)" -> "@platforms//os:os (HOST)"
"@platforms//os:os (HOST)"
"@platforms//cpu:x86_64 (HOST)"
"@platforms//cpu:x86_64 (HOST)" -> "@platforms//cpu:cpu (HOST)"
"@platforms//cpu:cpu (HOST)"
"//:apple-silicon (f7c5632)"
"//:apple-silicon (f7c5632)" -> "@platforms//cpu:arm64 (f7c5632)"
"//:apple-silicon (f7c5632)" -> "@platforms//os:osx (f7c5632)"
"@platforms//os:osx (f7c5632)"
"@platforms//os:osx (f7c5632)" -> "@platforms//os:os (f7c5632)"
"@platforms//os:os (f7c5632)"
"@platforms//cpu:arm64 (f7c5632)"
"@platforms//cpu:arm64 (f7c5632)" -> "@platforms//cpu:cpu (f7c5632)"
"@platforms//cpu:cpu (f7c5632)"
}
INFO: Elapsed time: 1.749s
INFO: 0 processes.
INFO: Build completed successfully, 0 total actions
thanks, I was just about to ask 😛
that's super weird; maybe something leftover from the _toolchain
/CROSSTOOL era makes cc_binary
s have an implicit dep on @local_config_cc//:toolchain
or something
regardless – I'm glad it works! even though it really does seem like you shouldn't have to pass in --cpu=darwin_arm64
Just to be sure: does actually running the binary that's produced work?