Skip to content

Commit 8bdb288

Browse files
authored
Use LLD for LTO builds on Mac (#4594)
Mac's LLD now supports ThinLTO and is much faster than ld with libLTO.
1 parent 3ff6652 commit 8bdb288

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,7 @@ if(BYN_ENABLE_LTO)
167167
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
168168
message(FATAL_ERROR "ThinLTO is only supported by clang")
169169
endif()
170-
if(NOT APPLE)
171-
add_link_flag("-fuse-ld=lld")
172-
endif()
170+
add_link_flag("-fuse-ld=lld")
173171
set_property(GLOBAL APPEND PROPERTY JOB_POOLS link_job_pool=2)
174172
set(CMAKE_JOB_POOL_LINK link_job_pool)
175173
add_compile_flag("-flto=thin")

0 commit comments

Comments
 (0)