Skip to content

Commit 65fa683

Browse files
committed
Enable clang-20 support
1 parent ba55790 commit 65fa683

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
config:
16+
- {name: "Ubuntu Clang 20", os: ubuntu-24.04, toolchain: "clang-20", clang_version: 20, installed_clang_version: 17, cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "}
1617
# Note: clang-19 + Asan setup causes errors on some platforms. Temporary skip some checks via .asan_options.
1718
- {name: "Ubuntu Clang 19", os: ubuntu-24.04, toolchain: "clang-19", clang_version: 19, installed_clang_version: 17, cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" ", asan_options: "new_delete_type_mismatch=0"}
1819
- {name: "Ubuntu Clang 18", os: ubuntu-24.04, toolchain: "clang-18", clang_version: 18, installed_clang_version: 17, cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "}

CMakePresets.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@
4545
"description": "Build with GCC 12 compilers",
4646
"toolchainFile": "${sourceDir}/etc/gcc-12-toolchain.cmake"
4747
},
48+
{
49+
"name": "clang-20",
50+
"inherits": "common",
51+
"displayName": "Clang 20",
52+
"description": "Build with Clang 20 compilers",
53+
"toolchainFile": "${sourceDir}/etc/clang-20-toolchain.cmake"
54+
},
4855
{
4956
"name": "clang-19",
5057
"inherits": "common",
@@ -93,6 +100,11 @@
93100
"inherits": "common",
94101
"configurePreset": "gcc-12"
95102
},
103+
{
104+
"name": "clang-20",
105+
"inherits": "common",
106+
"configurePreset": "clang-20"
107+
},
96108
{
97109
"name": "clang-19",
98110
"inherits": "common",
@@ -142,6 +154,11 @@
142154
"inherits": "common",
143155
"configurePreset": "gcc-12"
144156
},
157+
{
158+
"name": "clang-20",
159+
"inherits": "common",
160+
"configurePreset": "clang-20"
161+
},
145162
{
146163
"name": "clang-19",
147164
"inherits": "common",
@@ -227,6 +244,23 @@
227244
}
228245
]
229246
},
247+
{
248+
"name": "clang-20",
249+
"steps": [
250+
{
251+
"type": "configure",
252+
"name": "clang-20"
253+
},
254+
{
255+
"type": "build",
256+
"name": "clang-20"
257+
},
258+
{
259+
"type": "test",
260+
"name": "clang-20"
261+
}
262+
]
263+
},
230264
{
231265
"name": "clang-19",
232266
"steps": [

etc/clang-20-toolchain.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# cmake-format: off
2+
# etc/clang-20-toolchain.cmake -*-cmake-*-
3+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4+
# cmake-format: on
5+
6+
include_guard(GLOBAL)
7+
8+
set(CMAKE_C_COMPILER clang-20)
9+
set(CMAKE_CXX_COMPILER clang++-20)
10+
11+
include("${CMAKE_CURRENT_LIST_DIR}/clang-flags.cmake")

0 commit comments

Comments
 (0)