Skip to content

Commit 92c2577

Browse files
committed
Updated macos GitHub Action to LLVM 19 (#319)
1 parent 2ab8fd9 commit 92c2577

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/macos.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
uses: hendrikmuhs/[email protected]
3838

3939
- name: Install dependencies using homebrew
40-
run: brew install llvm@18 ninja yaml-cpp cmake ccache
40+
run: brew update && brew install llvm@19 ninja yaml-cpp cmake ccache
4141

4242
- name: Build and test
4343
run: CC=/opt/homebrew/opt/llvm/bin/clang CXX=/opt/homebrew/opt/llvm/bin/clang++ CMAKE_PREFIX=/opt/homebrew/opt/llvm/lib/cmake/llvm/ CMAKE_GENERATOR=Ninja CMAKE_EXE_LINKER_FLAGS="-L/opt/homebrew/opt/llvm/lib/c++ -Wl,-rpath,/opt/homebrew/opt/llvm/lib/c++" ENABLE_OBJECTIVE_C_TEST_CASES=ON make test
@@ -46,4 +46,4 @@ jobs:
4646
run: debug/src/clang-uml --version
4747

4848
- name: Print help
49-
run: debug/src/clang-uml --help
49+
run: debug/src/clang-uml --help

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
115115
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19)
116116
set(CUSTOM_COMPILE_OPTIONS ${CUSTOM_COMPILE_OPTIONS} -Wno-missing-template-arg-list-after-template-kw)
117117
endif()
118+
if(APPLE)
119+
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "arm" OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "arm64")
120+
# Use LLVM bundled unwind on Apple Silicon to fix segfaults on exception throw
121+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${HOMEBREW_PREFIX}/opt/llvm/lib/unwind -lunwind")
122+
endif()
123+
endif(APPLE)
118124
endif()
119125

120126
#

0 commit comments

Comments
 (0)