mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
Meta: Do not allow undefined symbols in executables and shared objects
The `--allow-shlib-undefined` option is a bit of a misnomer. It actually controls whether we should be allowed to have undefined references after symbols from all dependencies have been resolved, so it applies both to shared libraries and executables. LLD defaults to allowing undefined references in shared libraries, but not in executables. Previously, we had to disable this check for executables too, as it caused a build failure due to the LibC-LibPthread-libc++ and the LibCore-LibCrypto circular dependencies. Now that those have been resolved, we can enable this warning, in the hopes that it will prevent us from introducing circular libraries and missing dependencies that might cause unexpected breakage.
This commit is contained in:
parent
e1eefe2b52
commit
4a428ba252
Notes:
sideshowbarker
2024-07-17 21:17:53 +09:00
Author: https://github.com/BertalanD Commit: https://github.com/SerenityOS/serenity/commit/4a428ba2527 Pull-request: https://github.com/SerenityOS/serenity/pull/11744
1 changed files with 1 additions and 1 deletions
|
@ -204,10 +204,10 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang$")
|
|||
|
||||
# Clang doesn't add compiler_rt to the search path when compiling with -nostdlib.
|
||||
link_directories(${TOOLCHAIN_ROOT}/lib/clang/${CMAKE_CXX_COMPILER_VERSION}/lib/${SERENITY_ARCH}-pc-serenity/)
|
||||
add_link_options(LINKER:--allow-shlib-undefined)
|
||||
endif()
|
||||
|
||||
add_link_options(LINKER:-z,text)
|
||||
add_link_options(LINKER:--no-allow-shlib-undefined)
|
||||
|
||||
add_compile_definitions(SANITIZE_PTRS)
|
||||
set(CMAKE_CXX_FLAGS_STATIC "${CMAKE_CXX_FLAGS} -static")
|
||||
|
|
Loading…
Reference in a new issue