Skip to content

Commit

Permalink
macOS: Link libc++ statically so that installing LLVM via brew isn't …
Browse files Browse the repository at this point in the history
…required to run the executables
  • Loading branch information
Fulgen301 committed Nov 28, 2024
1 parent 9f72c9b commit 4907e33
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions autobuild/clang16_mac.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ cmake_minimum_required(VERSION 3.20)
set(CMAKE_C_COMPILER "/usr/local/opt/llvm/bin/clang")
set(CMAKE_CXX_COMPILER "/usr/local/opt/llvm/bin/clang++")

set(CMAKE_C_FLAGS_INIT "-stdlib=libc++ -fexperimental-library -Wno-parentheses")
set(CMAKE_CXX_FLAGS_INIT "${CMAKE_C_FLAGS_INIT}")
set(CMAKE_OBJCXX_FLAGS_INIT "${CMAKE_CXX_FLAGS_INIT}")
set(CMAKE_C_FLAGS_INIT "-fexperimental-library -Wno-parentheses")
set(CMAKE_CXX_FLAGS_INIT "-nostdlib++ ${CMAKE_C_FLAGS_INIT}")
set(CMAKE_OBJCXX_FLAGS_INIT "-nostdlib++ ${CMAKE_CXX_FLAGS_INIT}")

set(CMAKE_EXE_LINKER_FLAGS_INIT "-L/usr/local/opt/llvm/lib/c++")
set(CMAKE_SHARED_LINKER_FLAGS_INIT "-L/usr/local/opt/llvm/lib/c++")
set(CMAKE_EXE_LINKER_FLAGS_INIT "/usr/local/opt/llvm/lib/c++/libc++.a /usr/local/opt/llvm/lib/c++/libc++abi.a /usr/local/opt/llvm/lib/c++/libc++experimental.a")
set(CMAKE_SHARED_LINKER_FLAGS_INIT "/usr/local/opt/llvm/lib/c++/libc++.a /usr/local/opt/llvm/lib/c++/libc++abi.a /usr/local/opt/llvm/lib/c++/libc++experimental.a")

0 comments on commit 4907e33

Please sign in to comment.