Skip to content

Commit

Permalink
fix shit apple ld
Browse files Browse the repository at this point in the history
  • Loading branch information
microcai committed Jan 8, 2025
1 parent afd00a3 commit b740a00
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

option(WITHOUT_IOURING "use epoll/poll/kqueue to support IOCP. not io_uring" OFF)

if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
add_compile_options(-ffunction-sections -fdata-sections)
add_link_options(-Wl,--gc-sections)
if (NOT APPLE)
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
add_compile_options(-ffunction-sections -fdata-sections)
add_link_options(-Wl,--gc-sections)
endif()
endif()

if (NOT WIN32)
Expand Down

0 comments on commit b740a00

Please sign in to comment.