Skip to content

Commit a6fa8ca

Browse files
committed
chore: fix llvm builds:
* add download links for darwin * rename from zig-cc to hermetic-llvm Signed-off-by: Matt Leon <[email protected]>
1 parent 5f35a6d commit a6fa8ca

File tree

3 files changed

+28
-27
lines changed

3 files changed

+28
-27
lines changed

.bazelrc

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,17 @@ build:gcc --action_env=BAZEL_COMPILER=gcc
6767
build:gcc --action_env=CC=gcc
6868
build:gcc --action_env=CXX=g++
6969

70-
# Use Zig C/C++ compiler.
71-
build:zig-cc --incompatible_enable_cc_toolchain_resolution
72-
build:zig-cc --action_env BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
73-
build:zig-cc --extra_toolchains @llvm_toolchain//:cc-toolchain-x86_64-linux
74-
build:zig-cc --extra_toolchains @llvm_aarch64//:cc-toolchain-aarch64-linux
75-
build:zig-cc --extra_toolchains @emsdk//emscripten_toolchain:cc-toolchain-wasm
76-
build:zig-cc --host_copt=-fno-sanitize=undefined
77-
78-
# Use Zig C/C++ compiler (cross-compile to Linux/aarch64).
79-
build:zig-cc-linux-aarch64 --config=zig-cc
80-
#build:zig-cc-linux-aarch64 --platforms @zig_sdk//platform:linux_arm64
81-
build:zig-cc-linux-aarch64 --platforms @toolchains_llvm//platforms:linux-aarch64
82-
build:zig-cc-linux-aarch64 --cxxopt --gcc-install-dir=external/sysroot_linux_arm64/usr/lib/gcc/aarch64-linux-gnu/13/
70+
# Use vendored LLVM C/C++ compiler.
71+
build:hermetic-llvm --incompatible_enable_cc_toolchain_resolution
72+
build:hermetic-llvm --action_env BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
73+
build:hermetic-llvm --extra_toolchains @llvm_toolchain//:cc-toolchain-x86_64-linux
74+
build:hermetic-llvm --extra_toolchains @llvm_aarch64//:cc-toolchain-aarch64-linux
75+
build:hermetic-llvm --extra_toolchains @emsdk//emscripten_toolchain:cc-toolchain-wasm
76+
77+
# Use vendored LLVM C/C++ compiler (cross-compile to Linux/aarch64).
78+
build:linux-aarch64-cross --config=hermetic-llvm
79+
build:linux-aarch64-cross --platforms @toolchains_llvm//platforms:linux-aarch64
80+
build:linux-aarch64-cross --cxxopt --gcc-install-dir=external/sysroot_linux_arm64/usr/lib/gcc/aarch64-linux-gnu/13/
8381

8482
build --enable_platform_specific_config
8583

@@ -88,10 +86,6 @@ build:linux --cxxopt=-std=c++20 --host_cxxopt=-std=c++20
8886
build:macos --cxxopt=-std=c++20 --host_cxxopt=-std=c++20
8987
build:windows --cxxopt="/std:c++20" --host_cxxopt="/std:c++20"
9088

91-
# For Zig C/C++ compiler.
92-
build:linux --sandbox_add_mount_pair=/tmp
93-
build:macos --sandbox_add_mount_pair=/var/tmp
94-
build:windows --sandbox_add_mount_pair=C:\Temp
9589

9690
# Enable symlinks and runfiles on Windows (enabled by default on other platforms).
9791
startup --windows_enable_symlinks

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ jobs:
172172
arch: aarch64
173173
action: test
174174
targets: -//test/fuzz/...
175-
flags: --config=zig-cc-linux-aarch64 --@v8//bazel/config:v8_target_cpu=arm64
175+
flags: --config=linux-aarch64-cross --@v8//bazel/config:v8_target_cpu=arm64
176176
deps: qemu-user-static libc6-arm64-cross
177177
cache: true
178178
- name: 'V8 on macOS/x86_64'
@@ -244,7 +244,7 @@ jobs:
244244
os: ubuntu-24.04
245245
arch: aarch64
246246
action: build
247-
flags: --config=zig-cc-linux-aarch64
247+
flags: --config=linux-aarch64-cross
248248
deps: qemu-user-static libc6-arm64-cross
249249
- name: 'Wasmtime on Linux/s390x'
250250
engine: 'wasmtime'

bazel/dependencies.bzl

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,28 +58,35 @@ def proxy_wasm_cpp_host_dependencies():
5858
bazel_toolchain_dependencies()
5959
llvm_toolchain(
6060
name = "llvm_toolchain",
61-
llvm_version = "18.1.8",
61+
llvm_version = "19.1.0",
6262
sha256 = {
63-
"linux-x86_64": "54ec30358afcc9fb8aa74307db3046f5187f9fb89fb37064cdde906e062ebf36",
63+
"linux-x86_64": "cee77d641690466a193d9b88c89705de1c02bbad46bde6a3b126793c0a0f2923",
64+
"linux-aarch64": "7bb54afd330fe1a1c2d4c593fa1e2dbe2abd9bf34fb3597994ff41e443cf144b",
65+
"darwin-aarch64": "9da86f64a99f5ce9b679caf54e938736ca269c5e069d0c94ad08b995c5f25c16",
66+
"darwin-x86_64": "264f2f1e8b67f066749349ae8b4943d346cd44e099464164ef21b42a57663540",
6467
},
6568
strip_prefix = {
66-
"linux-x86_64": "clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04",
69+
"linux-x86_64": "LLVM-19.1.0-Linux-X64",
70+
"linux-aarch64": "clang+llvm-19.1.0-aarch64-linux-gnu",
71+
"darwin-aarch64": "LLVM-19.1.0-macOS-ARM64",
72+
"darwin-x86_64": "LLVM-19.1.0-macOS-X64",
6773
},
6874
urls = {
69-
"linux-x86_64": [
70-
"https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04.tar.xz",
71-
],
75+
"linux-x86_64": ["https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.0/LLVM-19.1.0-Linux-X64.tar.xz"],
76+
"linux-aarch64": ["https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.0/clang+llvm-19.1.0-aarch64-linux-gnu.tar.xz"],
77+
"darwin-aarch64": ["https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.0/LLVM-19.1.0-macOS-ARM64.tar.xz"],
78+
"darwin-x86_64": ["https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.0/LLVM-19.1.0-macOS-X64.tar.xz"],
7279
},
7380
)
7481

7582
llvm_toolchain(
7683
name = "llvm_aarch64",
77-
llvm_version = "18.1.8",
84+
llvm_version = "19.1.0",
7885
toolchain_roots = {
7986
"": "@llvm_toolchain_llvm//",
8087
},
8188
sysroot = {
82-
"linux-aarch64": "@sysroot_linux_arm64//:sysroot",
89+
"linux-aarch64": "@sysroot_linux_arm64//:sysroot",
8390
},
8491
)
8592

0 commit comments

Comments
 (0)