Skip to content

Commit b740a00

Browse files
committed
fix shit apple ld
1 parent afd00a3 commit b740a00

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
1111

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

14-
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
15-
add_compile_options(-ffunction-sections -fdata-sections)
16-
add_link_options(-Wl,--gc-sections)
14+
if (NOT APPLE)
15+
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
16+
add_compile_options(-ffunction-sections -fdata-sections)
17+
add_link_options(-Wl,--gc-sections)
18+
endif()
1719
endif()
1820

1921
if (NOT WIN32)

0 commit comments

Comments
 (0)