17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 20:19:20 +02:00

build with clang

Linux CI switches to clang 22; fixes what that exposed - export on
out-of-line member definitions, missing std includes, missing glm
imports. GCC 16 still builds.
This commit is contained in:
maj00r
2026-09-09 22:32:06 +02:00
parent 3f7960aad5
commit f16b5deefb
20 changed files with 63 additions and 33 deletions

View File

@@ -149,7 +149,7 @@ jobs:
sudo apt-get update
sudo apt-get install -y \
build-essential gcc-14 g++-14 ninja-build \
build-essential ninja-build wget lsb-release software-properties-common gnupg \
libgl1-mesa-dev \
libglew-dev \
libglfw3-dev \
@@ -163,6 +163,15 @@ jobs:
libwayland-dev \
wayland-protocols
- name: Install LLVM/Clang 22
run: |
# Noble ships Clang 18, whose C++20 module support is not good enough
# for this tree; apt.llvm.org has current releases.
wget -qO /tmp/llvm.sh https://apt.llvm.org/llvm.sh
chmod +x /tmp/llvm.sh
sudo /tmp/llvm.sh 22
sudo apt-get install -y clang-tools-22 # clang-scan-deps, needed to scan modules
#
# Existing MaSzyna CI already builds OpenAL Soft 1.24.2,
# so retain that instead of relying only on Ubuntu's package.
@@ -193,17 +202,16 @@ jobs:
- name: Show environment
run: |
gcc-14 --version
g++-14 --version
clang-22 --version
clang-scan-deps-22 --version
ninja --version
cmake --version
python --version
- name: Configure
env:
# C++20 named modules need GCC 14+; noble's default build-essential is GCC 13
CC: gcc-14
CXX: g++-14
CC: clang-22
CXX: clang++-22
run: |
cmake \
-S . \
@@ -215,7 +223,7 @@ jobs:
-DWITH_OPENVR=OFF \
-DUSE_LTO=OFF \
-DPython3_EXECUTABLE="${{ steps.python.outputs.python-path }}" \
-DCMAKE_CXX_FLAGS="-Wno-attributes -fno-inline-functions-called-once"
-DCMAKE_CXX_FLAGS="-Wno-attributes"
- name: Build
run: |