[llvm] [bazel] update .bazelversion to 8.0.0 (PR #119425)

Nick Desaulniers via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 10 10:44:59 PST 2024


https://github.com/nickdesaulniers updated https://github.com/llvm/llvm-project/pull/119425

>From 12fca092ecc7fa2c14c8e812deb948f1c0c3d7f6 Mon Sep 17 00:00:00 2001
From: Nick Desaulniers <ndesaulniers at google.com>
Date: Tue, 10 Dec 2024 10:08:25 -0800
Subject: [PATCH 1/4] [bazel] update .bazelversion to 8.0.0

Fixes:

    ERROR: The project you're trying to build requires Bazel 7.3.0 (specified
    in llvm-project/utils/bazel/.bazelversion), but it wasn't found in
    /usr/bin.

    You can install the required Bazel version via apt:
      sudo apt update && sudo apt install bazel-7.3.0

    If this doesn't work, check Bazel's installation instructions for help:
      https://bazel.build/install/ubuntu

Link: https://blog.bazel.build/2024/12/09/bazel-8-release.html
---
 utils/bazel/.bazelversion | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/bazel/.bazelversion b/utils/bazel/.bazelversion
index 1502020768a7b4..ae9a76b9249ada 100644
--- a/utils/bazel/.bazelversion
+++ b/utils/bazel/.bazelversion
@@ -1 +1 @@
-7.3.0
+8.0.0

>From 64f6c1dc10b275f247cfcc66a3ae605d09615c67 Mon Sep 17 00:00:00 2001
From: Nick Desaulniers <ndesaulniers at google.com>
Date: Tue, 10 Dec 2024 10:40:20 -0800
Subject: [PATCH 2/4] add --enable_workspace to .bazelrc

---
 utils/bazel/.bazelrc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/bazel/.bazelrc b/utils/bazel/.bazelrc
index 2628352f5162b6..3a49d4e0898c0c 100644
--- a/utils/bazel/.bazelrc
+++ b/utils/bazel/.bazelrc
@@ -9,7 +9,7 @@
 
 # Flip off to disable MODULE.bazel until we're ready.
 # https://github.com/llvm/llvm-project/issues/55924
-common --enable_bzlmod=false
+common --enable_bzlmod=false --enable_workspace
 
 # Prevent invalid caching if input files are modified during a build.
 build --experimental_guard_against_concurrent_changes

>From b8bd85c35c093e86f455c2186eb2389381a04a31 Mon Sep 17 00:00:00 2001
From: Nick Desaulniers <ndesaulniers at google.com>
Date: Tue, 10 Dec 2024 10:40:45 -0800
Subject: [PATCH 3/4] add explict http_archive for rules_cc

---
 utils/bazel/WORKSPACE | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/utils/bazel/WORKSPACE b/utils/bazel/WORKSPACE
index 66ba1ac1b17e1e..b6b1a0c3bd0f3e 100644
--- a/utils/bazel/WORKSPACE
+++ b/utils/bazel/WORKSPACE
@@ -16,6 +16,14 @@ http_archive(
     ],
 )
 
+# https://github.com/bazelbuild/rules_cc/releases/tag/0.0.17
+http_archive(
+    name = "rules_cc",
+    urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.17/rules_cc-0.0.17.tar.gz"],
+    sha256 = "abc605dd850f813bb37004b77db20106a19311a96b2da1c92b789da529d28fe1",
+    strip_prefix = "rules_cc-0.0.17",
+)
+
 new_local_repository(
     name = "llvm-raw",
     build_file_content = "# empty",

>From 3168b9fc0b2dbc468c4e3d170caf38ec6f327fd6 Mon Sep 17 00:00:00 2001
From: Nick Desaulniers <ndesaulniers at google.com>
Date: Tue, 10 Dec 2024 10:44:45 -0800
Subject: [PATCH 4/4] upgrade rules_python to 1.0.0

---
 utils/bazel/WORKSPACE | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/utils/bazel/WORKSPACE b/utils/bazel/WORKSPACE
index b6b1a0c3bd0f3e..b24dfd17afcd2c 100644
--- a/utils/bazel/WORKSPACE
+++ b/utils/bazel/WORKSPACE
@@ -37,9 +37,9 @@ llvm_configure(name = "llvm-project")
 maybe(
     http_archive,
     name = "rules_python",
-    sha256 = "778aaeab3e6cfd56d681c89f5c10d7ad6bf8d2f1a72de9de55b23081b2d31618",
-    strip_prefix = "rules_python-0.34.0",
-    url = "https://github.com/bazelbuild/rules_python/releases/download/0.34.0/rules_python-0.34.0.tar.gz",
+    sha256 = "4f7e2aa1eb9aa722d96498f5ef514f426c1f55161c3c9ae628c857a7128ceb07",
+    strip_prefix = "rules_python-1.0.0",
+    url = "https://github.com/bazelbuild/rules_python/releases/download/1.0.0/rules_python-1.0.0.tar.gz",
 )
 
 maybe(



More information about the llvm-commits mailing list