tests with sysroot
This commit is contained in:
33
WORKSPACE
33
WORKSPACE
@@ -19,12 +19,41 @@ bazel_toolchain_dependencies()
|
||||
|
||||
load("@com_grail_bazel_toolchain//toolchain:rules.bzl", "llvm_toolchain")
|
||||
|
||||
|
||||
LLVM_VERSION = "14.0.0"
|
||||
|
||||
llvm_toolchain(
|
||||
name = "llvm_toolchain",
|
||||
llvm_version = "14.0.0",
|
||||
llvm_version = LLVM_VERSION,
|
||||
)
|
||||
|
||||
load("@llvm_toolchain//:toolchains.bzl", "llvm_register_toolchains")
|
||||
# This sysroot is used by github.com/vsco/bazel-toolchains.
|
||||
http_archive(
|
||||
name = "org_chromium_sysroot_linux_x64",
|
||||
build_file_content = """
|
||||
filegroup(
|
||||
name = "sysroot",
|
||||
srcs = glob(["*/**"]),
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
""",
|
||||
sha256 = "84656a6df544ecef62169cfe3ab6e41bb4346a62d3ba2a045dc5a0a2ecea94a3",
|
||||
urls = ["https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/2202c161310ffde63729f29d27fe7bb24a0bc540/debian_stretch_amd64_sysroot.tar.xz"],
|
||||
)
|
||||
|
||||
llvm_toolchain(
|
||||
name = "llvm_toolchain_with_sysroot",
|
||||
llvm_version = LLVM_VERSION,
|
||||
sysroot = {
|
||||
"linux-x86_64": "@org_chromium_sysroot_linux_x64//:sysroot",
|
||||
},
|
||||
# We can share the downloaded LLVM distribution with the first configuration.
|
||||
toolchain_roots = {
|
||||
"": "@llvm_toolchain_llvm//",
|
||||
},
|
||||
)
|
||||
|
||||
load("@llvm_toolchain_with_sysroot//:toolchains.bzl", "llvm_register_toolchains")
|
||||
|
||||
#llvm_register_toolchains()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user