forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtoolchains.bzl
More file actions
28 lines (27 loc) · 1.09 KB
/
toolchains.bzl
File metadata and controls
28 lines (27 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
load("@envoy_repo//:compiler.bzl", "LLVM_PATH", "USE_LOCAL_SYSROOT")
load("@envoy_toolshed//repository:utils.bzl", "arch_alias")
load("@toolchains_llvm//toolchain:rules.bzl", "llvm_toolchain")
def envoy_toolchains():
native.register_toolchains("@envoy//bazel/rbe/toolchains/configs/linux/gcc/config:cc-toolchain")
arch_alias(
name = "clang_platform",
aliases = {
"amd64": "@envoy//bazel/platforms/rbe:linux_x64",
"aarch64": "@envoy//bazel/platforms/rbe:linux_arm64",
},
)
llvm_toolchain(
name = "llvm_toolchain",
llvm_version = "18.1.8",
# These libs are only included for cross-compile targets
cxx_cross_lib = {
"linux-aarch64": "@libcxx_libs_aarch64",
"linux-x86_64": "@libcxx_libs_x86_64",
},
cxx_standard = {"": "c++20"},
sysroot = {} if USE_LOCAL_SYSROOT else {
"linux-x86_64": "@sysroot_linux_amd64//:sysroot",
"linux-aarch64": "@sysroot_linux_arm64//:sysroot",
},
toolchain_roots = {"": LLVM_PATH} if LLVM_PATH else {},
)