mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
gvisor: Explicitly register C++ toolchains for cross-compilation.
Bazel >= 5 seems to no longer implicitly recognize coral_crosstool's C++ toolchains when looking through the possible set of toolchains to use for compiling C++ (`@bazel_tools//tools/cpp:toolchain_type`). This change explicitly registers these toolchains within `WORKSPACE`. PiperOrigin-RevId: 492011138
This commit is contained in:
committed by
gVisor bot
parent
1823b16fcc
commit
ba73788f2c
@@ -145,6 +145,28 @@ go_path(
|
||||
],
|
||||
)
|
||||
|
||||
# CC toolchain targets for cross-compilation.
|
||||
# Required to be explicitly specified in bazel >= 5.
|
||||
toolchain(
|
||||
name = "cc_toolchain_k8",
|
||||
target_compatible_with = [
|
||||
"@platforms//os:linux",
|
||||
"@platforms//cpu:x86_64",
|
||||
],
|
||||
toolchain = "@crosstool//:cc-compiler-k8",
|
||||
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
|
||||
)
|
||||
|
||||
toolchain(
|
||||
name = "cc_toolchain_aarch64",
|
||||
target_compatible_with = [
|
||||
"@platforms//os:linux",
|
||||
"@platforms//cpu:aarch64",
|
||||
],
|
||||
toolchain = "@crosstool//:cc-compiler-aarch64",
|
||||
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
|
||||
)
|
||||
|
||||
# gazelle is a set of build tools.
|
||||
#
|
||||
# To update the WORKSPACE from go.mod, use:
|
||||
|
||||
Reference in New Issue
Block a user