# Despite: https://github.com/emersion/mrsh/issues/78 # Apparently -exported_symbols_list works with Apple ld: # https://developer.apple.com/library/archive/documentation/Performance/Conceptual/CodeFootprint/Articles/ReducingExports.html --- CMakeLists.txt.orig 2021-10-27 19:02:28.000000000 +0700 +++ CMakeLists.txt 2022-09-05 22:14:55.000000000 +0700 @@ -297,9 +297,8 @@ add_definitions(-DTLS=${TLS}) # export list -if(APPLE AND (CMAKE_C_COMPILER_ID STREQUAL "Clang" OR - CMAKE_C_COMPILER_ID STREQUAL "AppleClang")) - # clang + lld +if(APPLE) + # clang + lld or gcc + ld64 string(CONCAT CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} " -exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/src/export.llvm") elseif(NOT MSVC)