diff --git a/Meta/CMake/lagom_options.cmake b/Meta/CMake/lagom_options.cmake index c37d889d38..0420561119 100644 --- a/Meta/CMake/lagom_options.cmake +++ b/Meta/CMake/lagom_options.cmake @@ -11,5 +11,6 @@ serenity_option(ENABLE_FUZZERS_LIBFUZZER OFF CACHE BOOL "Build fuzzers using Cla serenity_option(ENABLE_FUZZERS_OSSFUZZ OFF CACHE BOOL "Build OSS-Fuzz compatible fuzzers") serenity_option(BUILD_LAGOM OFF CACHE BOOL "Build parts of the system targeting the host OS for fuzzing/testing") serenity_option(ENABLE_LAGOM_CCACHE ON CACHE BOOL "Enable ccache for Lagom builds") +serenity_option(ENABLE_LAGOM_MOLD OFF CACHE BOOL "Enable mold for Lagom builds") serenity_option(ENABLE_LAGOM_LIBWEB ON CACHE BOOL "Enable compiling LibWeb for Lagom builds") serenity_option(ENABLE_LAGOM_LADYBIRD OFF CACHE BOOL "Enable compiling Ladybird from Lagom") diff --git a/Meta/Lagom/CMakeLists.txt b/Meta/Lagom/CMakeLists.txt index 641c03ab75..1145311c82 100644 --- a/Meta/Lagom/CMakeLists.txt +++ b/Meta/Lagom/CMakeLists.txt @@ -124,6 +124,10 @@ if (ENABLE_UNDEFINED_SANITIZER) set(LINKER_FLAGS "${LINKER_FLAGS} -fsanitize=undefined") endif() +if (ENABLE_LAGOM_MOLD) + add_link_options(-fuse-ld=mold) +endif() + if (ENABLE_FUZZERS) add_compile_options(-fno-omit-frame-pointer) endif()