mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 20:03:47 +00:00
Feature/flatpak clang llvm21 (#12727)
* Fix GIT_COMMIT_HASH not set in Flatpak builds The env var check was gated inside the .git directory check, so Flatpak builds (which exclude .git from the sandbox) always fell back to "0000000". Lift the env var check to top level and inject the commit hash into the Flatpak manifest via build-options.env. * Switch Flatpak build to Clang/LLD via LLVM 21 SDK extension - Add org.freedesktop.Sdk.Extension.llvm21 - Bump runtime to GNOME 49 (SDK 25.08) for llvm21 availability * fix build errors and improving build speed for flatpak * fxi more build errors * Update error messages for GNOME Platform and SDK versions
This commit is contained in:
@@ -173,10 +173,7 @@ option(BUILD_TESTS "Build unit tests" OFF)
|
||||
option(ORCA_TOOLS "Build Orca tools" OFF)
|
||||
|
||||
if (FLATPAK)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++20")
|
||||
set(SLIC3R_PCH OFF CACHE BOOL "" FORCE)
|
||||
set(SLIC3R_FHS ON CACHE BOOL "" FORCE)
|
||||
set(BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
||||
set(SLIC3R_DESKTOP_INTEGRATION OFF CACHE BOOL "" FORCE)
|
||||
endif ()
|
||||
|
||||
@@ -457,9 +454,12 @@ if (NOT MSVC AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMP
|
||||
add_compile_options(-Wno-unknown-pragmas)
|
||||
endif()
|
||||
|
||||
# Bit of a hack for flatpak building: compress the debug info with zstd to save space in CI
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 13.0)
|
||||
add_compile_options(-gz=zstd)
|
||||
# Compress the debug info with zstd to save space in Flatpak CI builds
|
||||
if(FLATPAK)
|
||||
if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 13.0) OR
|
||||
("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15.0))
|
||||
add_compile_options(-gz=zstd)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 14)
|
||||
|
||||
Reference in New Issue
Block a user