aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Meumertzheim <fabian@meumertzhe.im>2021-12-07 12:18:21 +0100
committerFabian Meumertzheim <fabian@meumertzhe.im>2021-12-07 15:28:21 +0100
commit4a482c7d2e31388197455d45801ed4602407ed0c (patch)
treeca1837bc340ad09d1279d0428619c2d4a46f3ce9
parent5f7dfcb3dcf577a9a9c031909271d8b4a61106fb (diff)
downloadjazzer-api-4a482c7d2e31388197455d45801ed4602407ed0c.tar.gz
Update bazel_toolchain
-rw-r--r--.bazelrc2
-rw-r--r--WORKSPACE.bazel9
-rw-r--r--driver/BUILD.bazel2
-rw-r--r--third_party/bazel-toolchain-export-dynamic-macos-asan.patch23
-rw-r--r--third_party/bazel-toolchain-support-ubuntu-21.patch13
5 files changed, 13 insertions, 36 deletions
diff --git a/.bazelrc b/.bazelrc
index 6e20be6b..a685613d 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -31,7 +31,7 @@ test:windows --noincompatible_strict_action_env
run:windows --noincompatible_strict_action_env
# Toolchain
-build:toolchain --extra_toolchains=@llvm_toolchain//:cc-toolchain-linux,@llvm_toolchain//:cc-toolchain-darwin
+build:toolchain --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux,@llvm_toolchain//:cc-toolchain-x86_64-darwin
build:toolchain --//third_party:toolchain
# CI tests (not using the toolchain to test OSS-Fuzz compatibility)
diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel
index 07c46d0a..2da0cec6 100644
--- a/WORKSPACE.bazel
+++ b/WORKSPACE.bazel
@@ -29,11 +29,10 @@ http_archive(
# the toolchain in the CI, we have to explicitly depend on the dylib and
# add it to the runfiles for clang/ld.
"//third_party:bazel-toolchain-export-dynamic-macos-asan.patch",
- "//third_party:bazel-toolchain-support-ubuntu-21.patch",
],
- sha256 = "54b54eedc71b93b278c44b6c056a737dc68545c6da75f63d0810676e1181f559",
- strip_prefix = "bazel-toolchain-76ce37e977a304acf8948eadabb82c516320e286",
- urls = ["https://github.com/grailbio/bazel-toolchain/archive/76ce37e977a304acf8948eadabb82c516320e286.tar.gz"],
+ sha256 = "da607faed78c4cb5a5637ef74a36fdd2286f85ca5192222c4664efec2d529bb8",
+ strip_prefix = "bazel-toolchain-0.6.3",
+ urls = ["https://github.com/grailbio/bazel-toolchain/archive/0.6.3.tar.gz"],
)
http_archive(
@@ -75,7 +74,7 @@ llvm_toolchain(
name = "llvm_toolchain",
llvm_version = "12.0.0",
sysroot = {
- "linux": "@org_chromium_sysroot_linux_x64//:sysroot",
+ "linux-x86_64": "@org_chromium_sysroot_linux_x64//:sysroot",
},
)
diff --git a/driver/BUILD.bazel b/driver/BUILD.bazel
index 82082b23..becd4fe1 100644
--- a/driver/BUILD.bazel
+++ b/driver/BUILD.bazel
@@ -164,7 +164,7 @@ cc_binary(
deps = [":driver_lib"] + select({
# There is no static ASan runtime on macOS, so link to the dynamic
# runtime library if on macOS and using the toolchain.
- ":using_toolchain_on_osx": ["@llvm_toolchain//:macos_asan_dynamic"],
+ ":using_toolchain_on_osx": ["@llvm_toolchain_llvm//:macos_asan_dynamic"],
"//conditions:default": [],
}),
)
diff --git a/third_party/bazel-toolchain-export-dynamic-macos-asan.patch b/third_party/bazel-toolchain-export-dynamic-macos-asan.patch
index ccbd79b0..05d300e8 100644
--- a/third_party/bazel-toolchain-export-dynamic-macos-asan.patch
+++ b/third_party/bazel-toolchain-export-dynamic-macos-asan.patch
@@ -1,21 +1,12 @@
-diff --git toolchain/BUILD.tpl toolchain/BUILD.tpl
-index bc9280f..f4bfa3d 100644
---- toolchain/BUILD.tpl
-+++ toolchain/BUILD.tpl
-@@ -126,6 +126,7 @@ filegroup(
- [
- "lib/lib*.a",
- "lib/clang/%{llvm_version}/lib/**/*.a",
-+ "lib/clang/%{llvm_version}/lib/**/*.dylib",
- ],
- exclude = [
- "lib/libLLVM*.a",
-@@ -216,3 +217,8 @@ filegroup(
- ":linker_components",
- ],
+diff --git toolchain/BUILD.llvm_repo toolchain/BUILD.llvm_repo
+--- toolchain/BUILD.llvm_repo
++++ toolchain/BUILD.llvm_repo
+@@ -124,3 +124,8 @@ filegroup(
+ name = "strip",
+ srcs = ["bin/llvm-strip"],
)
+
+cc_import(
+ name = "macos_asan_dynamic",
-+ shared_library = "lib/clang/%{llvm_version}/lib/darwin/libclang_rt.asan_osx_dynamic.dylib",
++ shared_library = "lib/clang/12.0.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib",
+)
diff --git a/third_party/bazel-toolchain-support-ubuntu-21.patch b/third_party/bazel-toolchain-support-ubuntu-21.patch
deleted file mode 100644
index b605cfc1..00000000
--- a/third_party/bazel-toolchain-support-ubuntu-21.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git toolchain/tools/llvm_release_name.py toolchain/tools/llvm_release_name.py
-index 8ee544f..86f29f4 100755
---- toolchain/tools/llvm_release_name.py
-+++ toolchain/tools/llvm_release_name.py
-@@ -77,7 +77,7 @@ def _linux(llvm_version):
- os_name = "linux-sles%s" % version
- elif distname == "ubuntu" and version.startswith("14.04"):
- os_name = "linux-gnu-ubuntu-14.04"
-- elif (distname == "ubuntu" and version.startswith("20.04")) or (distname == "linuxmint" and version.startswith("20")):
-+ elif (distname == "ubuntu" and version.startswith("2")) or (distname == "linuxmint" and version.startswith("20")):
- if major_llvm_version < 11:
- # There is no binary packages specifically for 20.04, but those for 18.04 works on
- # 20.04