Skip to content

Commit

Permalink
Working combination:
Browse files Browse the repository at this point in the history
* Drop `-fuse-ld=lld`.
* Pin `toolchains_llvm` to bazel-contrib/toolchains_llvm#229.
* Manually specify clang 17.0.6 files (required by the above).
  • Loading branch information
helly25 committed Mar 25, 2024
1 parent bb1888a commit cada7b5
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,3 @@ build:clang --incompatible_enable_cc_toolchain_resolution
build:clang --//mbo/mope:clang_format=
build:clang --cxxopt=-gmlt
build:clang --host_cxxopt=-gmlt
build:clang --linkopt="-fuse-ld=lld"
build:clang --host_linkopt="-fuse-ld=lld"
22 changes: 21 additions & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,29 @@ load("@toolchains_llvm//toolchain:rules.bzl", "llvm_toolchain")
llvm_toolchain(
name = "llvm_toolchain",
llvm_versions = {
"": "17.0.6",
"linux-aarch64": "17.0.6",
"linux-x86_64": "17.0.6",
"darwin-aarch64": "17.0.6",
"darwin-x86_64": "15.0.7", # For Intel based macs.
},
sha256 = {
"linux-aarch64": "6dd62762285326f223f40b8e4f2864b5c372de3f7de0731cb7cd55ca5287b75a",
"limux-x86_64": "884ee67d647d77e58740c1e645649e29ae9e8a6fe87c1376be0f3a30f3cc9ab3",
"darwin-aarch64": "1264eb3c2a4a6d5e9354c3e5dc5cb6c6481e678f6456f36d2e0e566e9400fcad",
"darwin-x86_64": "d16b6d536364c5bec6583d12dd7e6cf841b9f508c4430d9ee886726bd9983f1c",
},
strip_prefix = {
"linux-aarch64": "clang+llvm-17.0.6-aarch64-linux-gnu",
"linux-x86_64": "clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04",
"darwin-aarch64": "clang+llvm-17.0.6-arm64-apple-darwin22.0",
"darwin-x86_64": "clang+llvm-15.0.7-x86_64-apple-darwin21.0",
},
urls = {
"linux-aarch64": ["https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-aarch64-linux-gnu.tar.xz"],
"linux-x86_64": ["https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz"],
"darwin-aarch64": ["https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-arm64-apple-darwin22.0.tar.xz"],
"darwin-x86_64": ["https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.7/clang+llvm-15.0.7-x86_64-apple-darwin21.0.tar.xz"],
},
)

load("@llvm_toolchain//:toolchains.bzl", "llvm_register_toolchains")
Expand Down
17 changes: 12 additions & 5 deletions workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,17 @@ def mbo_workspace_load_modules():
sha256 = "43451a32bf271e7ba4635a07f7996d535501f066c0fe8feab04fb0c91dd5986e",
)

http_archive(
# Cannot yet support toolchains_llvm 1.0.0. It enables C++20 modules in a broken way.
github_archive(
name = "toolchains_llvm",
sha256 = "e91c4361f99011a54814e1afbe5c436e0d329871146a3cd58c23a2b4afb50737",
strip_prefix = "toolchains_llvm-1.0.0",
canonical_id = "1.0.0",
url = "https://github.com/bazel-contrib/toolchains_llvm/releases/download/1.0.0/toolchains_llvm-1.0.0.tar.gz",
commit = "f9666fff585fdb53ea97ccec07ef1bc5d4aa5098",
repo = "https://github.com/bazel-contrib/toolchains_llvm",
integrity = "sha256-avzZXfOiNvw7oTvEJbmyny9Tz97qEoayYDvibYYJJW0=",
)
#http_archive(
# name = "toolchains_llvm",
# sha256 = "",
# strip_prefix = "toolchains_llvm-1.0.0",
# canonical_id = "1.0.0",
# url = "https://github.com/bazel-contrib/toolchains_llvm/releases/download/1.0.0/toolchains_llvm-1.0.0.tar.gz",
#)

0 comments on commit cada7b5

Please sign in to comment.