Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,15 @@ if(NOT MSVC AND NOT EMSCRIPTEN)
endif()
endif()

# The version of clang currently on our Mac bots doesn't seem to support this flag.
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND (LINUX OR WINDOWS))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment why not MacOS?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I am guessing the reason is that it is always used there..?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually the opposite; lld historically hasn't had good support for Mach-O. I'm not sure what the current status is but the version of Clang in the SDK on the bots here doesn't even support -fuse-ld=lld, so I figured it wasn't really worth investigating.

add_link_flag("-fuse-ld=lld")
endif()

if(BYN_ENABLE_LTO)
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
message(FATAL_ERROR "ThinLTO is only supported by clang")
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")
Expand Down
Loading