Skip to content

Commit a3a8682

Browse files
authored
Declare LLVM 21 as "officially" supported (#1254)
1 parent dd7c369 commit a3a8682

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

.github/workflows/linux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
- { llvm-version: 18, opt-level: '-O1' }
2727
- { llvm-version: 19, opt-level: '-O1' }
2828
# Latest version: all opt levels
29+
# TODO: LLVM 21 is not available from apt yet.
2930
- { llvm-version: 20, opt-level: '-O0' }
3031
- { llvm-version: 20, opt-level: '-O1' }
3132
- { llvm-version: 20, opt-level: '-O2' }

.github/workflows/macos.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,12 @@ jobs:
6565
- { llvm-version: 17, opt-level: '-O1' }
6666
- { llvm-version: 18, opt-level: '-O1' }
6767
- { llvm-version: 19, opt-level: '-O1' }
68-
# Latest version: all opt levels
69-
- { llvm-version: 20, opt-level: '-O0' }
7068
- { llvm-version: 20, opt-level: '-O1' }
71-
- { llvm-version: 20, opt-level: '-O2' }
72-
- { llvm-version: 20, opt-level: '-O3' }
69+
# Latest version: all opt levels
70+
- { llvm-version: 21, opt-level: '-O0' }
71+
- { llvm-version: 21, opt-level: '-O1' }
72+
- { llvm-version: 21, opt-level: '-O2' }
73+
- { llvm-version: 21, opt-level: '-O3' }
7374
steps:
7475
- uses: actions/checkout@v6
7576
with:

.github/workflows/valgrind.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ jobs:
5353
- { llvm-version: 18, opt-level: '-O1' }
5454
- { llvm-version: 19, opt-level: '-O1' }
5555
# Latest version: all opt levels
56+
# TODO: LLVM 21 is not available from apt yet.
5657
- { llvm-version: 20, opt-level: '-O0' }
5758
- { llvm-version: 20, opt-level: '-O1' }
5859
- { llvm-version: 20, opt-level: '-O2' }

Makefile.posix

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
# On macos, brew installs LLVM to a weird place in /usr/local/
33
# On NetBSD, llvm-config is unversioned.
44
# On any platform, it can be set as environment variable or make parameter.
5-
#
6-
# TODO: Move LLVM 21 to the top when officially supported
75
LLVM_CONFIG != \
86
command -v "$(LLVM_CONFIG)" \
7+
|| command -v llvm-config-21 \
8+
|| command -v /usr/local/opt/llvm@21/bin/llvm-config \
9+
|| command -v /opt/homebrew/opt/llvm@21/bin/llvm-config \
910
|| command -v llvm-config-20 \
1011
|| command -v /usr/local/opt/llvm@20/bin/llvm-config \
1112
|| command -v /opt/homebrew/opt/llvm@20/bin/llvm-config \
@@ -24,15 +25,12 @@ LLVM_CONFIG != \
2425
|| command -v llvm-config-15 \
2526
|| command -v /usr/local/opt/llvm@15/bin/llvm-config \
2627
|| command -v /opt/homebrew/opt/llvm@15/bin/llvm-config \
27-
|| command -v llvm-config \
28-
|| command -v llvm-config-21 \
29-
|| command -v /usr/local/opt/llvm@21/bin/llvm-config \
30-
|| command -v /opt/homebrew/opt/llvm@21/bin/llvm-config \
28+
|| command -v llvm-config
3129

3230
all: jou
3331

3432
config.jou: Makefile.posix
35-
@v=`$(LLVM_CONFIG) --version`; case "$$v" in 15.*|16.*|17.*|18.*|19.*|20.*) ;; 21.*) ;; *) echo "Error: Found unsupported LLVM version $$v. Only LLVM 15,16,17,18,19,20 are supported."; exit 1; esac
33+
@v=`$(LLVM_CONFIG) --version`; case "$$v" in 15.*|16.*|17.*|18.*|19.*|20.*|21.*) ;; *) echo "Error: Found unsupported LLVM version $$v. Only LLVM 15,16,17,18,19,20,21 are supported."; exit 1; esac
3634
echo '# auto-generated by Makefile.posix' > config.jou
3735
echo '' >> config.jou
3836
printf 'link "%s"\n' `$(LLVM_CONFIG) --ldflags --libs` >> config.jou

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ The instructions for developing Jou are in [CONTRIBUTING.md](CONTRIBUTING.md).
9292
```
9393
Let me know if you use a distro that doesn't have `apt`,
9494
and you need help with this step.
95+
See also the list of supported LLVM/clang versions below.
9596
2. Download and compile Jou.
9697
```
9798
$ git clone https://github.com/Akuli/jou
@@ -126,8 +127,6 @@ These LLVM/clang versions are supported:
126127
- LLVM 18 with clang 18
127128
- LLVM 19 with clang 19
128129
- LLVM 20 with clang 20
129-
130-
These versions are not covered by automated tests but seem to work anyway:
131130
- LLVM 21 with clang 21
132131
133132
By default, the `make` command picks the latest available version.
@@ -157,6 +156,7 @@ $ LLVM_CONFIG=llvm-config-15 make
157156
- `llvm@18`
158157
- `llvm@19`
159158
- `llvm@20`
159+
- `llvm@21`
160160
2. Install Python if you don't have it already.
161161
Any reasonably new version will work.
162162
3. Download and compile Jou.

0 commit comments

Comments
 (0)