mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 12:35:14 +00:00
Toolchain: Add CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME to Platform
This property tells CMake that if a library is missing a SONAME field, the link editor(s) we use will insert the full path to the library into the binary. This is the behaivor of GNU ld compatible linkers, so let's avoid that possiblity by telling CMake that it really doesn't want to let the linker embed the full path to the lib. This is especially important when cross-compiling things for ports and such, as the full path to the lib will have absolutely nothing to do with the runtime path
This commit is contained in:
parent
4dc538da0e
commit
eb672aef31
Notes:
sideshowbarker
2024-07-17 21:46:07 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/eb672aef313 Pull-request: https://github.com/SerenityOS/serenity/pull/11584 Reviewed-by: https://github.com/BertalanD
1 changed files with 4 additions and 0 deletions
|
@ -8,6 +8,10 @@ set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
|
|||
set(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -Wl,--hash-style=gnu,-z,relro,-z,now,-z,noexecstack,-z,separate-code")
|
||||
|
||||
# Shared libraries with no builtin soname may not be linked safely by
|
||||
# specifying the file path.
|
||||
set(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1)
|
||||
|
||||
# Initialize C link type selection flags. These flags are used when
|
||||
# building a shared library, shared module, or executable that links
|
||||
# to other libraries to select whether to use the static or shared
|
||||
|
|
Loading…
Add table
Reference in a new issue