Skip to content

Commit

Permalink
Linker arg?
Browse files Browse the repository at this point in the history
  • Loading branch information
NickGerleman authored Oct 27, 2023
1 parent 52509a4 commit 8a650f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmake/project-defaults.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ add_compile_options(
$<$<CONFIG:RELEASE>:-O2>
# Enable separate sections per function/data item
$<$<CONFIG:RELEASE>:-ffunction-sections>
$<$<CONFIG:RELEASE>:-fdata-sections>
# Use libc++ when building with Clang on Linux
$<$<CXX_COMPILER_ID:Clang>:-stdlib=libc++>)
$<$<CONFIG:RELEASE>:-fdata-sections>)

add_link_options(
# Discard unused sections
$<$<CONFIG:RELEASE>:$<$<CXX_COMPILER_ID:Clang,GNU>:-Wl,--gc-sections>>
$<$<CONFIG:RELEASE>:$<$<CXX_COMPILER_ID:AppleClang>:-Wl,-dead_strip>>)
$<$<CONFIG:RELEASE>:$<$<CXX_COMPILER_ID:AppleClang>:-Wl,-dead_strip>>
# Use libc++ when building with Clang on Linux
$<$<CXX_COMPILER_ID:Clang>:-stdlib=libc++>)

endif()

0 comments on commit 8a650f1

Please sign in to comment.