Skip to content

Commit

Permalink
Fix broken macos build
Browse files Browse the repository at this point in the history
  • Loading branch information
slavek-kucera committed Sep 29, 2022
1 parent c25b963 commit 2cb627c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmake/compiler_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ endif()

if(APPLE)
if(WITH_STATIC_CRT)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lc++abi ${LLVM_PATH}/lib/libc++.a")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -lc++abi ${LLVM_PATH}/lib/libc++.a")
file(GLOB_RECURSE libcpp_file "${LLVM_PATH}/lib/**/libc++.a")
message(STATUS "Using libc++ in ${libcpp_file}" )
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lc++abi ${libcpp_file}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -lc++abi ${libcpp_file}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdlib++")
endif()
endif()
Expand Down

0 comments on commit 2cb627c

Please sign in to comment.