Skip to content

Commit

Permalink
fix: only apply --export-all-symbol on Windows (#176)
Browse files Browse the repository at this point in the history
It's meaningless for other platforms. And ld.gold doesn't support so if
LTO was enabled we will get invalid arguments.

address #152

Signed-off-by: Coelacanthus <uwu@coelacanthus.name>
  • Loading branch information
CoelacanthusHex authored Dec 15, 2024
1 parent da3d2a8 commit b21406d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion euicc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ if(LPAC_DYNAMIC_LIBEUICC)
endif()
endforeach()
set_target_properties(euicc PROPERTIES PUBLIC_HEADER "${ALL_HEADERS}")
set_target_properties(euicc PROPERTIES LINK_FLAGS "-Wl,--export-all-symbols")
# Only useful on Windows, and will lead to invalid arguments on ld.gold.
if(WIN32)
set_target_properties(euicc PROPERTIES LINK_FLAGS "-Wl,--export-all-symbols")
endif()
# Install a pkg-config file
configure_file(libeuicc.pc.in libeuicc.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libeuicc.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
Expand Down

0 comments on commit b21406d

Please sign in to comment.