Skip to content

Commit

Permalink
Use latest Rust version, Xcode 16 beta, LLVM 20-git on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
fhanau committed Sep 10, 2024
1 parent 7cca852 commit d472e89
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ build --incompatible_disallow_empty_glob
# Prevents bazel cache invalidation when switching terminals
build --incompatible_strict_action_env

# build --@rules_rust//rust/toolchain/channel=nightly

# Dawn tint build flags
build --@dawn//src/tint:tint_build_glsl_writer=False
build --@dawn//src/tint:tint_build_glsl_validator=False
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
fixup:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/fixup.yml
labels:
labels:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/labels.yml
uses: ./.github/workflows/labels.yml
test:
strategy:
matrix:
Expand Down Expand Up @@ -93,14 +93,14 @@ jobs:
wget https://apt.llvm.org/llvm.sh
sed -i '/apt-get install/d' llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 19
sudo apt-get install -y --no-install-recommends clang-19 lld-19 libunwind-19 libc++abi1-19 libc++1-19 libc++-19-dev libclang-rt-19-dev llvm-19
echo "build:linux --action_env=CC=/usr/lib/llvm-19/bin/clang --action_env=CXX=/usr/lib/llvm-19/bin/clang++" >> .bazelrc
echo "build:linux --host_action_env=CC=/usr/lib/llvm-19/bin/clang --host_action_env=CXX=/usr/lib/llvm-19/bin/clang++" >> .bazelrc
sudo ./llvm.sh 20
sudo apt-get install -y --no-install-recommends clang-20 lld-20 libunwind-20 libc++abi1-20 libc++1-20 libc++-20-dev libclang-rt-20-dev llvm-20
echo "build:linux --action_env=CC=/usr/lib/llvm-20/bin/clang --action_env=CXX=/usr/lib/llvm-20/bin/clang++" >> .bazelrc
echo "build:linux --host_action_env=CC=/usr/lib/llvm-20/bin/clang --host_action_env=CXX=/usr/lib/llvm-20/bin/clang++" >> .bazelrc
echo "build:linux --copt='-Werror'" >> .bazelrc
echo "build:linux --copt='-Wno-error=#warnings'" >> .bazelrc
echo "build:linux --copt='-Wno-error=deprecated-declarations'" >> .bazelrc
sed -i -e "s%llvm-symbolizer%/usr/lib/llvm-19/bin/llvm-symbolizer%" .bazelrc
sed -i -e "s%llvm-symbolizer%/usr/lib/llvm-20/bin/llvm-symbolizer%" .bazelrc
- name: Setup macOS
if: matrix.os.name == 'macOS'
# TODO: We want to symbolize stacks for crashes on CI. Xcode is currently based on LLVM 16,
Expand All @@ -112,7 +112,9 @@ jobs:
# runner.
# Use latest available Xcode version – runner still defaults to 15.0.1.
run: |
sudo xcode-select -s "/Applications/Xcode_15.3.app"
# sudo xcode-select -s "/Applications/Xcode_15.3.app"
# Evaluating Xcode 16.0 beta
sudo xcode-select -s "/Applications/Xcode_16_beta_6.app"
# export LLVM_SYMBOLIZER=$(brew --prefix llvm@15)/bin/llvm-symbolizer
# sed -i -e "s%llvm-symbolizer%${LLVM_SYMBOLIZER}%" .bazelrc
- name: Setup Windows
Expand All @@ -121,7 +123,7 @@ jobs:
run: |
[System.IO.File]::WriteAllLines((Join-Path -Path $env:USERPROFILE -ChildPath '.bazelrc'), 'startup --output_user_root=C:/tmp')
# TODO: Test that the build is still compatible with the latest LLVM release
choco upgrade llvm --version=18.1.6
# choco upgrade llvm --version=18.1.8
- name: Configure download mirrors
shell: bash
run: |
Expand Down
5 changes: 4 additions & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,10 @@ rust_register_toolchains(
edition = "2021",
# Rust registers wasm targets by default which we don't need, workerd is only built for its native platform.
extra_target_triples = [],
versions = ["1.77.0"], # LLVM 17
versions = [
"1.81.0",
"nightly/2024-07-25",
], # LLVM 18
)

load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies")
Expand Down

0 comments on commit d472e89

Please sign in to comment.