Build *against* (i.e. compile *in*) LLVM matching what Chromium uses
Note that we build *with* whatever compiler is configured on the system with `CC`, which may be a different version of LLVM.
Stop disabling a new-in-LLVM-15 warning that only fired when compiling LLVM 14. We don't compile LLVM 14 anymore, but sometimes we might compile *with* LLVM 14.
PiperOrigin-RevId: 455058739
diff --git a/.bazelrc b/.bazelrc
index 301c00f..088df15 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -8,9 +8,5 @@
# enable linking against prebuilt LLVM with no RTTI
build:generic_clang --copt=-fno-rtti --host_copt=-fno-rtti
-# new warning in LLVM 15, fires when building LLVM 14.0.0
-# ref: https://github.com/llvm/llvm-project/commit/48285c20
-build:generic_clang --copt=-Wno-unused-but-set-variable --host_copt=-Wno-unused-but-set-variable
-
build --config=generic_clang
build --sandbox_base=/dev/shm
diff --git a/bazel/llvm.bzl b/bazel/llvm.bzl
index 061c5e5..3c4fb40 100644
--- a/bazel/llvm.bzl
+++ b/bazel/llvm.bzl
@@ -54,12 +54,14 @@
)
def llvm_loader_repository_dependencies():
- # This *declares* the dependency, but it won't actually be *downloaded*
- # unless it's used.
+ # This *declares* the dependency, but it won't actually be *downloaded* unless it's used.
+ #
+ # To make things easier for the Chromium folks, we track the LLVM version they build against:
+ # https://source.chromium.org/search?q=CLANG_REVISION+file:^tools/clang/scripts/update.py$
new_git_repository(
name = "llvm-raw",
build_file_content = "# empty",
- commit = "8091f7120c6be15266ddd060c56d1997850ffbd0",
+ commit = "llvmorg-15-init-11722-g3f3a235a",
shallow_since = "2022-05-18",
remote = "https://github.com/llvm/llvm-project.git",
)