mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-04 00:27:47 +00:00
CMake: Enable -Wl,--no-undefined on ELF platforms
This is mostly a development helper, to move all undefined symbols in shared libraries to link time rather than load time. At the same time, set --no-allow-shlib-undefined and -z,defs to further enforce the rule.
This commit is contained in:
parent
5e43fec6dd
commit
223b13ae93
Notes:
github-actions[bot]
2025-01-06 19:42:41 +00:00
Author: https://github.com/ADKaster
Commit: 223b13ae93
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2983
3 changed files with 23 additions and 0 deletions
|
@ -16,6 +16,11 @@ function(clang_plugin target_name)
|
|||
set_property(GLOBAL APPEND PROPERTY CLANG_PLUGINS_COMPILE_OPTIONS_FOR_TESTS -fplugin=${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/lib${target_name}.so)
|
||||
|
||||
add_lagom_library_install_rules(${target_name})
|
||||
|
||||
if (NOT WIN32 AND NOT APPLE)
|
||||
target_link_options(${target_name} PRIVATE LINKER:-z,undefs)
|
||||
target_link_options(${target_name} PRIVATE LINKER:--allow-shlib-undefined)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(depend_on_clang_plugin target_name plugin_name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue