summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@chromium.org>2022-04-14 16:47:20 -0700
committerGitHub <noreply@github.com>2022-04-14 23:47:20 +0000
commit8bdb2887215e7e291453d42b29da400bf864ad6c (patch)
tree7e4c440d72cca6f2c21d370c9fff99eb0965de6f
parent3ff665280b1967f4f094eeb0049285c9281ccdc2 (diff)
downloadbinaryen-8bdb2887215e7e291453d42b29da400bf864ad6c.tar.gz
binaryen-8bdb2887215e7e291453d42b29da400bf864ad6c.tar.bz2
binaryen-8bdb2887215e7e291453d42b29da400bf864ad6c.zip
Use LLD for LTO builds on Mac (#4594)
Mac's LLD now supports ThinLTO and is much faster than ld with libLTO.
-rw-r--r--CMakeLists.txt4
1 files changed, 1 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 36d68ec6f..94d2122de 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -167,9 +167,7 @@ if(BYN_ENABLE_LTO)
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
message(FATAL_ERROR "ThinLTO is only supported by clang")
endif()
- if(NOT APPLE)
- add_link_flag("-fuse-ld=lld")
- endif()
+ add_link_flag("-fuse-ld=lld")
set_property(GLOBAL APPEND PROPERTY JOB_POOLS link_job_pool=2)
set(CMAKE_JOB_POOL_LINK link_job_pool)
add_compile_flag("-flto=thin")