Skip to content

Commit 505e680

Browse files
aykevldeadprogram
authored andcommitted
nix: use LLVM 18 instead of LLVM 17
This should fix some CI issues we're currently having. Thanks to @sylv-io for discovering that we need to remove LLVM to avoid an Xtensa backend linker error.
1 parent 87c6e19 commit 505e680

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

Diff for: .github/workflows/nix.yml

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ jobs:
1515
nix-test:
1616
runs-on: ubuntu-latest
1717
steps:
18+
- name: Uninstall system LLVM
19+
# Hack to work around issue where we still include system headers for
20+
# some reason.
21+
# See: https://github.com/tinygo-org/tinygo/pull/4516#issuecomment-2416363668
22+
run: sudo apt-get remove llvm-18
1823
- name: Checkout
1924
uses: actions/checkout@v4
2025
- name: Pull musl

Diff for: flake.lock

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: flake.nix

+6-6
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
inputs = {
3636
# Use a recent stable release, but fix the version to make it reproducible.
3737
# This version should be updated from time to time.
38-
nixpkgs.url = "nixpkgs/nixos-23.11";
38+
nixpkgs.url = "nixpkgs/nixos-24.05";
3939
flake-utils.url = "github:numtide/flake-utils";
4040
};
4141
outputs = { self, nixpkgs, flake-utils }:
@@ -49,11 +49,11 @@
4949
buildInputs = [
5050
# These dependencies are required for building tinygo (go install).
5151
go
52-
llvmPackages_17.llvm
53-
llvmPackages_17.libclang
52+
llvmPackages_18.llvm
53+
llvmPackages_18.libclang
5454
# Additional dependencies needed at runtime, for building and/or
5555
# flashing.
56-
llvmPackages_17.lld
56+
llvmPackages_18.lld
5757
avrdude
5858
binaryen
5959
# Additional dependencies needed for on-chip debugging.
@@ -68,7 +68,7 @@
6868
# Without setting these explicitly, Homebrew versions might be used
6969
# or the default `ar` and `nm` tools might be used (which don't
7070
# support wasi).
71-
export CLANG="clang-17 -resource-dir ${llvmPackages_17.clang.cc.lib}/lib/clang/17"
71+
export CLANG="clang-18 -resource-dir ${llvmPackages_18.clang.cc.lib}/lib/clang/18"
7272
export LLVM_AR=llvm-ar
7373
export LLVM_NM=llvm-nm
7474
@@ -77,7 +77,7 @@
7777
export MD5SUM=md5sum
7878
7979
# Ugly hack to make the Clang resources directory available.
80-
export GOFLAGS="\"-ldflags=-X github.com/tinygo-org/tinygo/goenv.clangResourceDir=${llvmPackages_17.clang.cc.lib}/lib/clang/17\" -tags=llvm17"
80+
export GOFLAGS="\"-ldflags=-X github.com/tinygo-org/tinygo/goenv.clangResourceDir=${llvmPackages_18.clang.cc.lib}/lib/clang/18\" -tags=llvm18"
8181
'';
8282
};
8383
}

0 commit comments

Comments
 (0)