Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use faster lld as the linker #168

Merged
merged 1 commit into from
Oct 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_EXE_LINKER_FLAGS "-fuse-ld=lld")

# Compile comamnds for clang tools
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
Expand Down Expand Up @@ -50,6 +51,7 @@ function(faabric_lib lib_name)
add_library(faabric::${lib_name} ALIAS ${lib_name})

if(BUILD_SHARED_LIBS)
target_link_options(${lib_name} PRIVATE "-fuse-ld=lld")
set_property(TARGET ${lib_name} PROPERTY POSITION_INDEPENDENT_CODE ON)
set_property(TARGET ${lib_name}_obj PROPERTY POSITION_INDEPENDENT_CODE ON)
endif()
Expand Down Expand Up @@ -96,6 +98,10 @@ add_library(faabric
)
add_library(faabric::faabric ALIAS faabric)

if(BUILD_SHARED_LIBS)
target_link_options(faabric PRIVATE "-fuse-ld=lld")
endif()

target_link_libraries(faabric PUBLIC
faabric::faabricmpi
faabric::common_dependencies
Expand Down