1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 02:07:35 +00:00

Meta: Enable RELR relocations

Also add a check to serenity.sh to ensure that the toolchain is new
enough for this feature to work.
This commit is contained in:
Daniel Bertalan 2022-02-05 15:48:32 +01:00 committed by Andreas Kling
parent 7ab6816b49
commit ba5bbde7ee
3 changed files with 25 additions and 1 deletions

View file

@ -274,6 +274,13 @@ if(NOT "${SERENITY_ARCH}" STREQUAL "aarch64")
if (ENABLE_MOLD_LINKER)
add_link_options(-fuse-ld=mold)
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang$" OR USE_MOLD_LINKER)
add_link_options(LINKER:--pack-dyn-relocs=relr)
else()
add_link_options(LINKER:-z,pack-relative-relocs)
endif()
add_subdirectory(Userland)
add_subdirectory(Tests)
endif()