build: Fix more macOS build issues

This commit is contained in:
WerWolv
2025-12-05 18:06:00 +01:00
parent df3200f936
commit 4f4af83699
3 changed files with 2 additions and 9 deletions

View File

@@ -590,7 +590,7 @@ jobs:
GH_TOKEN: ${{ github.token }} GH_TOKEN: ${{ github.token }}
run: | run: |
gh extension install actions/gh-actions-cache gh extension install actions/gh-actions-cache
gh actions-cache delete "build-macos-arm64-cache" --confirm || true gh cache delete "macos-arm64-cache" --confirm || true
macos-arm64-package: macos-arm64-package:
runs-on: macos-15-intel runs-on: macos-15-intel

View File

@@ -774,17 +774,10 @@ macro(setupCompilerFlags target)
endif() endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND APPLE) if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND APPLE)
execute_process(COMMAND brew --prefix llvm OUTPUT_VARIABLE LLVM_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
if (NOT LLVM_PREFIX STREQUAL "")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${LLVM_PREFIX}/lib/c++")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${LLVM_PREFIX}/lib/c++")
endif()
addCCXXFlag("-Wno-unknown-warning-option" ${target}) addCCXXFlag("-Wno-unknown-warning-option" ${target})
if (CMAKE_BUILD_TYPE STREQUAL "Debug") if (CMAKE_BUILD_TYPE STREQUAL "Debug")
add_compile_definitions(_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG) add_compile_definitions(_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG)
else()
add_compile_definitions(_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE)
endif() endif()
endif() endif()

View File

@@ -17,7 +17,7 @@ cp /tmp/arm-osx-mytriplet.cmake /vcpkg/triplets/community/arm-osx-mytriplet.cmak
EOF EOF
## Install make ## Install make
RUN --mount=type=cache,target=/var/lib/apt/lists/ apt update && apt install -y make RUN --mount=type=cache,target=/var/lib/apt/lists/ apt update && apt install -y make cmake
## fix environment ## fix environment
### add install_name_tool for cmake command that won't have the right env set (see PostprocessBundle.cmake function postprocess_bundle()) ### add install_name_tool for cmake command that won't have the right env set (see PostprocessBundle.cmake function postprocess_bundle())