Skip to content

Commit

Permalink
Bump LLVM and switch to c++20.
Browse files Browse the repository at this point in the history
`grpc` and a `rules_hdl` dep needed to be bumped too.

PiperOrigin-RevId: 605077234
  • Loading branch information
grebe authored and copybara-github committed Feb 7, 2024
1 parent 34d0b52 commit a9ba6d1
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 23 deletions.
10 changes: 5 additions & 5 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
build --action_env=BAZEL_CXXOPTS=-std=c++17
build --cxxopt "-std=c++17"
build --action_env=BAZEL_CXXOPTS=-std=c++20
build --cxxopt "-std=c++20"
# Enable default C++ extensions (required in switching to our packaged LLVM)
build --copt "-D_DEFAULT_SOURCE=1"
# Signal that we're using a compliant C++17 implementation with features removed
# Signal that we're using a compliant C++20 implementation with features removed
# (Required for (e.g.) Boost compatibility)
build --copt "-D_HAS_AUTO_PTR_ETC=0"
build --copt "-Wno-sign-compare"
build --copt "-Wno-comment"
build --host_cxxopt "-std=c++17"
build --host_cxxopt "-std=c++20"
# Enable default C++ extensions (required in switching to our packaged LLVM)
build --host_copt "-D_DEFAULT_SOURCE=1"
# Signal that we're using a compliant C++17 implementation with features removed
# Signal that we're using a compliant C++20 implementation with features removed
# (Required for (e.g.) Boost compatibility)
build --host_copt "-D_HAS_AUTO_PTR_ETC=0"
build --host_copt "-Wno-sign-compare"
Expand Down
18 changes: 8 additions & 10 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,23 @@ workspace(name = "com_google_xls")
# files because it's not allowed to use `load` inside of a function.
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# Commit on 2023-07-17, current as of 2023-08-05.
# Commit on 2024-01-19, current as of 2024-02-01.
http_archive(
name = "com_grail_bazel_toolchain",
sha256 = "5fb0a6ae0f5bc72a7d80e6de0edad906c9936729734009f1c01dac4b06f966e0",
strip_prefix = "bazel-toolchain-f94335f1f5434256b1793dafbb7dd07773b0e76e",
urls = [
"https://github.com/grailbio/bazel-toolchain/archive/f94335f1f5434256b1793dafbb7dd07773b0e76e.zip",
],
name = "toolchains_llvm",
sha256 = "5b01ab0cf15ddf9c7e4412964238e24ca869ba0e2d0825b70d055f2b2cd895a9",
strip_prefix = "bazel-toolchain-05f0bc1f4b1b12ad7ce0ad5ef9235a94ff39ff54",
url = "https://github.com/grailbio/bazel-toolchain/archive/05f0bc1f4b1b12ad7ce0ad5ef9235a94ff39ff54.tar.gz",
)

load("@com_grail_bazel_toolchain//toolchain:deps.bzl", "bazel_toolchain_dependencies")
load("@toolchains_llvm//toolchain:deps.bzl", "bazel_toolchain_dependencies")

bazel_toolchain_dependencies()

load("@com_grail_bazel_toolchain//toolchain:rules.bzl", "llvm_toolchain")
load("@toolchains_llvm//toolchain:rules.bzl", "llvm_toolchain")

llvm_toolchain(
name = "llvm_toolchain",
llvm_version = "16.0.0",
llvm_version = "17.0.2",
)

load("@llvm_toolchain//:toolchains.bzl", "llvm_register_toolchains")
Expand Down
10 changes: 5 additions & 5 deletions dependency_support/load_external.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,13 @@ def load_external_repositories():
build_file = "@com_google_xls//dependency_support/linenoise:bundled.BUILD.bazel",
)

# Released on 2023-06-01, current as of 2023-06-06.
# https://github.com/grpc/grpc/releases/tag/v1.55.1
# Released on 2023-11-28, current as of 2024-02-01.
# https://github.com/grpc/grpc/releases/tag/v1.60.0
http_archive(
name = "com_github_grpc_grpc",
urls = ["https://github.com/grpc/grpc/archive/v1.55.1.tar.gz"],
sha256 = "9c3c0a0ad986ee4fc0a9b58fd71255010068df7d1437c425b525d68c30c85ac7",
strip_prefix = "grpc-1.55.1",
urls = ["https://github.com/grpc/grpc/archive/v1.60.0.tar.gz"],
integrity = "sha256-Q3BouLd307M52pTTSY8dwgZCrJv6dttDq91SIYaxVCs=",
strip_prefix = "grpc-1.60.0",
repo_mapping = {
"@local_config_python": "@python39",
"@system_python": "@python39",
Expand Down
6 changes: 3 additions & 3 deletions dependency_support/rules_hdl/workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ def repo():
sha256 = "fd9e99f6ccb9e946755f9bc444abefbdd1eedb32c372c56dcacc7eb486aed178",
)

# Current as of 2023-12-21
git_hash = "08884ef0ca94fc8fc4a1bd96cd02203e7788a137"
archive_sha256 = "d19bb835722318d61406fc58a5762dcbb52db689eadde5ff459a6a1b7941c3d2"
# Current as of 2024-02-01
git_hash = "b99dfa1869f340c0e598522960ff514345b40a7b"
archive_sha256 = "2a6da82f4f51aefa38ddf82291d49846736dd6abf95f3ea149129eb985ae09ed"

maybe(
http_archive,
Expand Down

0 comments on commit a9ba6d1

Please sign in to comment.