Skip to content

Commit ba138c5

Browse files
committed
Update hermetic-llvm to be platform-agnostic and use in CI
Signed-off-by: Matt Leon <mattleon@google.com>
1 parent 22b6429 commit ba138c5

File tree

2 files changed

+9
-27
lines changed

2 files changed

+9
-27
lines changed

.bazelrc

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -67,33 +67,14 @@ build:gcc --action_env=BAZEL_COMPILER=gcc
6767
build:gcc --action_env=CC=gcc
6868
build:gcc --action_env=CXX=g++
6969

70-
build:hermetic --incompatible_enable_cc_toolchain_resolution
71-
build:hermetic --action_env BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
72-
build:hermetic --extra_toolchains @emsdk//emscripten_toolchain:cc-toolchain-wasm
73-
74-
# Use vendored LLVM C/C++ compiler.
75-
build:hermetic-llvm --config=hermetic
76-
build:hermetic-llvm --extra_toolchains @llvm_toolchain//:cc-toolchain-x86_64-linux
77-
78-
build:hermetic-llvm-macos-x86_64 --config=hermetic
79-
build:hermetic-llvm-macos-x86_64 --extra_toolchains @llvm_toolchain//:cc-toolchain-x86_64-darwin
80-
# Below flags mitigate https://github.com/bazel-contrib/toolchains_llvm/pull/229.
81-
build:hermetic-llvm-macos-x86_64 --features=-libtool
82-
8370
build:hermetic-llvm --incompatible_enable_cc_toolchain_resolution
8471
build:hermetic-llvm --action_env BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
85-
build:hermetic-llvm --extra_toolchains @llvm_toolchain//:cc-toolchain-x86_64-linux
86-
build:hermetic-llvm --extra_toolchains @llvm_aarch64//:cc-toolchain-aarch64-linux
8772
build:hermetic-llvm --extra_toolchains @emsdk//emscripten_toolchain:cc-toolchain-wasm
8873

89-
# Use vendored LLVM C/C++ compiler (cross-compile to Linux/aarch64).
90-
build:linux-aarch64-cross --config=hermetic-llvm
91-
build:linux-aarch64-cross --extra_toolchains @llvm_aarch64//:cc-toolchain-aarch64-linux
92-
build:linux-aarch64-cross --platforms @toolchains_llvm//platforms:linux-aarch64
93-
build:linux-aarch64-cross --cxxopt --gcc-install-dir=external/sysroot_linux_arm64/usr/lib/gcc/aarch64-linux-gnu/13/
94-
# Below 2 flags allow tests to be run after cross-compiling.
95-
build:linux-aarch64-cross --test_env=QEMU_LD_PREFIX=/usr/aarch64-linux-gnu/
96-
build:linux-aarch64-cross --run_under=qemu-aarch64-static
74+
build:hermetic-llvm-macos --config=hermetic-llvm
75+
# Below flags mitigate https://github.com/bazel-contrib/toolchains_llvm/pull/229.
76+
build:hermetic-llvm-macos --features=-libtool
77+
build:hermetic-llvm-macos --features=-supports_dynamic_linker
9778

9879
build --enable_platform_specific_config
9980

.github/workflows/test.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,23 +139,23 @@ jobs:
139139
os: ubuntu-24.04
140140
arch: x86_64
141141
action: test
142-
flags: --config=clang --define=crypto=system
142+
flags: --config=hermetic-llvm --define=crypto=system
143143
cache: true
144144
- name: 'V8 on Linux/x86_64 with ASan'
145145
engine: 'v8'
146146
repo: 'v8'
147147
os: ubuntu-24.04
148148
arch: x86_64
149149
action: test
150-
flags: --config=clang-asan
150+
flags: --config=hermetic-llvm --config=clang-asan
151151
cache: true
152152
- name: 'V8 on Linux/x86_64 with TSan'
153153
engine: 'v8'
154154
repo: 'v8'
155155
os: ubuntu-24.04
156156
arch: x86_64
157157
action: test
158-
flags: --config=clang-tsan
158+
flags: --config=hermetic-llvm --config=clang-tsan
159159
cache: true
160160
- name: 'V8 on Linux/x86_64 with GCC'
161161
engine: 'v8'
@@ -172,14 +172,15 @@ jobs:
172172
arch: aarch64
173173
action: test
174174
targets: -//test/fuzz/...
175+
flags: --config=hermetic-llvm --@v8//bazel/config:v8_target_cpu=arm64
175176
cache: true
176177
- name: 'V8 on macOS/x86_64'
177178
engine: 'v8'
178179
repo: 'v8'
179180
os: macos-13
180181
arch: x86_64
181182
action: test
182-
flags: --config=hermetic-llvm-macos-x86_64
183+
flags: --config=hermetic-llvm-macos
183184
cache: true
184185
- name: 'WAMR interp on Linux/x86_64'
185186
engine: 'wamr-interp'

0 commit comments

Comments
 (0)