Skip to content

Commit

Permalink
Work towards bazel 8.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jonmeow committed Dec 20, 2024
1 parent e2fb320 commit 9604aae
Show file tree
Hide file tree
Showing 9 changed files with 2,354 additions and 2,924 deletions.
3 changes: 3 additions & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ bazel-carbon-lang

# See github_tools/MODULE.bazel.
github_tools

# Used as part of repo patching.
third_party/boost_unordered
11 changes: 11 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# Exceptions. See /LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# TODO: WORKSPACE will be removed in bazel 9, should finish moving off.
common --enable_workspace

# Ensure all builds have Carbon's workspace status attached. We have carefully
# factored the stamping done by this to avoid excessive build performance impact
# and so enable stamping with it by default. CI and systems especially dependent
Expand Down Expand Up @@ -128,7 +131,15 @@ build --allow_unresolved_symlinks=false
# RC file here if present.
try-import %workspace%/user.bazelrc

# The version of treesitter rules we're using depends on empty globs.
# TODO: Look at the different rules in the registry.
build --incompatible_disallow_empty_glob=false

# TODO: Enable as many incompatible flags as we can, per
# https://bazel.build/release/backward-compatibility. To get the latest list,
# using `bazelisk --migrate build //...` will help.
build --incompatible_strict_action_env

# This excludes things like rules_android to reduce warnings.
# TODO: Disable this completely.
build --incompatible_autoload_externally=+@rules_java,+@rules_python,+@rules_shell
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.3.0
8.0.0
4 changes: 2 additions & 2 deletions .gdbinit
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
# Exceptions. See /LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

source external/_main~llvm_project~llvm-project/llvm/utils/gdb-scripts/prettyprinters.py
source external/_main~llvm_project~llvm-project/libcxx/utils/gdb/libcxx/printers.py
source external/+llvm_project+llvm-project/llvm/utils/gdb-scripts/prettyprinters.py
source external/+llvm_project+llvm-project/libcxx/utils/gdb/libcxx/printers.py
python register_libcxx_printer_loader()
4 changes: 2 additions & 2 deletions .vscode/lldb_launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"args": ["--file_tests=${relativeFile}"],
"debuggerRoot": "${workspaceFolder}",
"initCommands": [
"command script import external/_main~llvm_project~llvm-project/llvm/utils/lldbDataFormatters.py",
"command script import external/+llvm_project+llvm-project/llvm/utils/lldbDataFormatters.py",
"settings set target.source-map \".\" \"${workspaceFolder}\""
],
"env": { "TEST_TMPDIR": "/tmp" }
Expand All @@ -28,7 +28,7 @@
],
"debuggerRoot": "${workspaceFolder}",
"initCommands": [
"command script import external/_main~llvm_project~llvm-project/llvm/utils/lldbDataFormatters.py",
"command script import external/+llvm_project+llvm-project/llvm/utils/lldbDataFormatters.py",
"settings set target.source-map \".\" \"${workspaceFolder}\""
]
}
Expand Down
32 changes: 21 additions & 11 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ http_archive = use_repo_rule(
)

bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_pkg", version = "0.10.1")
bazel_dep(name = "abseil-cpp", version = "20240116.2")
bazel_dep(name = "re2", version = "2024-06-01")
bazel_dep(name = "googletest", version = "1.14.0.bcr.1")
bazel_dep(name = "google_benchmark", version = "1.8.4")
bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "abseil-cpp", version = "20240722.0.bcr.2")
bazel_dep(name = "re2", version = "2024-07-02.bcr.1")
bazel_dep(name = "googletest", version = "1.15.2")
bazel_dep(name = "google_benchmark", version = "1.8.5")

# The registry only has an old version. We use that here to avoid a miss but
# override it with a newer version.
Expand Down Expand Up @@ -65,10 +65,20 @@ git_override(
remote = "https://github.com/google/tcmalloc.git",
)

bazel_dep(name = "rules_bison", version = "0.2.2")
bazel_dep(name = "rules_flex", version = "0.2.1")
bazel_dep(name = "rules_m4", version = "0.2.3")
bazel_dep(name = "rules_cc", version = "0.0.9")
# protobuf and tcmalloc rely on incompatible rules_fuzzing versions. Force the
# protobuf version, even though it's just an indirect dependency of something.
#
# TODO: This is probably okay because of how we use tcmalloc, but it's
# definitely undesirable and should be removed when possible.
single_version_override(
module_name = "rules_fuzzing",
version = "0.5.2",
)

bazel_dep(name = "rules_bison", version = "0.3")
bazel_dep(name = "rules_flex", version = "0.3")
bazel_dep(name = "rules_m4", version = "0.2.4")
bazel_dep(name = "rules_cc", version = "0.1.0")

bazel_dep(name = "bazel_clang_tidy", dev_dependency = True)
git_override(
Expand Down Expand Up @@ -106,7 +116,7 @@ http_archive(

# Required for llvm-project.
bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "zlib", version = "1.3.1.bcr.3", repo_name = "llvm_zlib")
bazel_dep(name = "zlib", version = "1.3.1.bcr.4", repo_name = "llvm_zlib")
bazel_dep(name = "zstd", version = "1.5.6", repo_name = "llvm_zstd")

###############################################################################
Expand Down Expand Up @@ -143,7 +153,7 @@ use_repo(llvm_project, "llvm-project")
# Python
###############################################################################

bazel_dep(name = "rules_python", version = "0.33.1")
bazel_dep(name = "rules_python", version = "1.0.0")

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
Expand Down
Loading

0 comments on commit 9604aae

Please sign in to comment.