Skip to content

Commit 8831269

Browse files
committed
build and test LLVM version 16
Add LLVM-16 to the Nix builds and CI matrix. Also add the option to explicitly select an LLVM version so the CircleCI build can still work as before. We should support at least LLVM-17 currently, but there appears to be a significant performance regression in compiling the generated code for large variants that I'm going to debug separately. The long term goal is to support and test all versions 15 and up. Test plan: - CI
1 parent 40d3f39 commit 8831269

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
- run:
102102
name: Build
103103
command: |
104-
/tmp/cmake/build/bin/cmake -G Ninja -B build/ -DWITH_FLAKY_TESTS=Off -DCODE_COVERAGE=On -DWARNINGS_AS_ERRORS=<< parameters.warnings_as_errors >>
104+
/tmp/cmake/build/bin/cmake -G Ninja -B build/ -DLLVM_REQUESTED_VERSION=15 -DWITH_FLAKY_TESTS=Off -DCODE_COVERAGE=On -DWARNINGS_AS_ERRORS=<< parameters.warnings_as_errors >>
105105
ninja -C build/
106106
# Testing rubbish:
107107
cp test/ci.oid.toml build/testing.oid.toml

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: 16-core-ubuntu
1919
strategy:
2020
matrix:
21-
llvm_version: [15]
21+
llvm_version: [15, 16]
2222
steps:
2323
- uses: actions/[email protected]
2424
- uses: cachix/install-nix-action@v27

.github/workflows/test-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515
- uses: dorny/test-reporter@v1
1616
with:
17-
artifact: test-results-15
17+
artifact: test-results-16
1818
name: CTest Tests
1919
path: results.xml
2020
reporter: jest-junit

CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,16 @@ find_package(Boost REQUIRED COMPONENTS
218218
)
219219
message(STATUS "Linking Boost libraries: ${Boost_LIBRARIES}")
220220

221-
### LLVM and Clang - Preferring Clang 15
222-
find_package(LLVM 15 REQUIRED CONFIG)
221+
### LLVM and Clang
222+
find_package(LLVM ${LLVM_REQUESTED_VERSION} REQUIRED CONFIG)
223+
223224
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
224225
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
225226

227+
if((${LLVM_VERSION_MAJOR} VERSION_LESS 15) OR (${LLVM_VERSION_MAJOR} VERSION_GREATER 16))
228+
message(SEND_ERROR "Object Introspection currently requires an LLVM version between 15 and 16!")
229+
endif()
230+
226231
find_package(Clang REQUIRED CONFIG)
227232
message(STATUS "Found Clang ${LLVM_PACKAGE_VERSION}")
228233
message(STATUS "Using ClangConfig.cmake in: ${Clang_DIR}")

flake.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,10 @@
9999
in
100100
{
101101
packages = rec {
102-
default = oid-llvm15;
102+
default = oid-llvm16;
103103

104104
oid-llvm15 = mkOidPackage pkgs.llvmPackages_15;
105+
oid-llvm16 = mkOidPackage pkgs.llvmPackages_16;
105106
};
106107

107108
apps.default = {

0 commit comments

Comments
 (0)