17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-31 19:19:03 +01: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

@@ -483,14 +483,13 @@ target_sources(${PROJECT_NAME}
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD_REQUIRED ON CXX_EXTENSIONS OFF)
# GCC's lazy loading of module interfaces trips over the simulation-core partition
# ("failed to load pendings" / "Bad file data" while reading eu07.simcore:dynobj).
# Loading eagerly avoids it; drop this once the compiler bug is fixed.
# GCC 16's lazy loading of module interfaces is broken for this project: reading
# eu07.simcore:dynobj gives "Bad file data", and eu07.glm gives "recursive lazy
# load" / "failed to load pendings for glm::vec". Eager loading is the only way
# through, and it costs roughly twice the memory per compiler process.
# Drop both this and the job pool below once the compiler bug is fixed.
# Clang is the compiler this project is built and tested with (Clang 22 in CI);
# it needs none of the workarounds below. GCC 16 still builds the tree, but only
# with eager module loading: its lazy loading is broken here, reading
# eu07.simcore:dynobj gives "Bad file data" and eu07.glm gives "recursive lazy
# load" / "failed to load pendings for glm::vec". Eager loading costs roughly
# twice the memory per compiler process. Drop this and the job pool below once
# the compiler bug is fixed.
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(${PROJECT_NAME} PRIVATE -fno-module-lazy)