diff --git a/Meta/CMake/common_compile_options.cmake b/Meta/CMake/common_compile_options.cmake index 410273bc95..0acf0cd0cb 100644 --- a/Meta/CMake/common_compile_options.cmake +++ b/Meta/CMake/common_compile_options.cmake @@ -32,3 +32,8 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") # FIXME: This warning seems useful but has too many false positives with GCC 13. add_compile_options(-Wno-dangling-reference) endif() + +if (UNIX AND NOT APPLE AND NOT ENABLE_FUZZERS) + add_compile_options(-fno-semantic-interposition) + add_compile_options(-fvisibility-inlines-hidden) +endif() diff --git a/Meta/CMake/lagom_compile_options.cmake b/Meta/CMake/lagom_compile_options.cmake index f65b48b5c2..7be594b6bd 100644 --- a/Meta/CMake/lagom_compile_options.cmake +++ b/Meta/CMake/lagom_compile_options.cmake @@ -5,9 +5,6 @@ add_compile_options(-Wno-shorten-64-to-32) add_compile_options(-fsigned-char) add_compile_options(-g1) add_compile_options(-O2) -if (NOT ENABLE_FUZZERS AND NOT APPLE) - add_compile_options(-fno-semantic-interposition) -endif() if (NOT WIN32) add_compile_options(-fPIC) endif() diff --git a/Meta/CMake/serenity_compile_options.cmake b/Meta/CMake/serenity_compile_options.cmake index 1680b0fa9d..1c94e0c999 100644 --- a/Meta/CMake/serenity_compile_options.cmake +++ b/Meta/CMake/serenity_compile_options.cmake @@ -18,7 +18,6 @@ add_compile_options(-Wwrite-strings) add_compile_options(-fno-delete-null-pointer-checks) add_compile_options(-ffile-prefix-map=${SerenityOS_SOURCE_DIR}=.) -add_compile_options(-fno-semantic-interposition) add_compile_options(-fsized-deallocation) add_compile_options(-fstack-clash-protection) add_compile_options(-fstack-protector-strong)