Skip to content

Commit

Permalink
Enable clang-20 support
Browse files Browse the repository at this point in the history
  • Loading branch information
neatudarius committed Nov 11, 2024
1 parent ba55790 commit 65fa683
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
fail-fast: false
matrix:
config:
- {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\" "}
# Note: clang-19 + Asan setup causes errors on some platforms. Temporary skip some checks via .asan_options.
- {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"}
- {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\" "}
Expand Down
34 changes: 34 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@
"description": "Build with GCC 12 compilers",
"toolchainFile": "${sourceDir}/etc/gcc-12-toolchain.cmake"
},
{
"name": "clang-20",
"inherits": "common",
"displayName": "Clang 20",
"description": "Build with Clang 20 compilers",
"toolchainFile": "${sourceDir}/etc/clang-20-toolchain.cmake"
},
{
"name": "clang-19",
"inherits": "common",
Expand Down Expand Up @@ -93,6 +100,11 @@
"inherits": "common",
"configurePreset": "gcc-12"
},
{
"name": "clang-20",
"inherits": "common",
"configurePreset": "clang-20"
},
{
"name": "clang-19",
"inherits": "common",
Expand Down Expand Up @@ -142,6 +154,11 @@
"inherits": "common",
"configurePreset": "gcc-12"
},
{
"name": "clang-20",
"inherits": "common",
"configurePreset": "clang-20"
},
{
"name": "clang-19",
"inherits": "common",
Expand Down Expand Up @@ -227,6 +244,23 @@
}
]
},
{
"name": "clang-20",
"steps": [
{
"type": "configure",
"name": "clang-20"
},
{
"type": "build",
"name": "clang-20"
},
{
"type": "test",
"name": "clang-20"
}
]
},
{
"name": "clang-19",
"steps": [
Expand Down
11 changes: 11 additions & 0 deletions etc/clang-20-toolchain.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# cmake-format: off
# etc/clang-20-toolchain.cmake -*-cmake-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# cmake-format: on

include_guard(GLOBAL)

set(CMAKE_C_COMPILER clang-20)
set(CMAKE_CXX_COMPILER clang++-20)

include("${CMAKE_CURRENT_LIST_DIR}/clang-flags.cmake")

0 comments on commit 65fa683

Please sign in to comment.