Compare commits

...
1 Commits
Author SHA1 Message Date
Cory BenfieldandSaleem Abdulrasool ddb07e896a build: attempt to workaround linker issues on Darwin (#105) (#106)
The use of a non-cctools librarian causes ld64 some heartburn.
Explicitly opt into using the cctools librarian.

rdar://87850031
(cherry picked from commit facc82fbb4)

Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2022-02-25 17:51:00 +00:00
+5
View File
@@ -37,6 +37,11 @@ if(BUILD_SHARED_LIBS)
set(CMAKE_POSITION_INDEPENDENT_CODE YES)
endif()
if(CMAKE_SYSTEM_NAME STREQUAL Darwin AND NOT CMAKE_CROSSCOMPILING)
set(CMAKE_AR "/usr/bin/ar")
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> crs <TARGET> <LINK_FLAGS> <OBJECTS>")
endif()
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
find_package(dispatch CONFIG)
find_package(Foundation CONFIG)