diff --git a/cmake/XrplSanitizers.cmake b/cmake/XrplSanitizers.cmake index 95c4e7fb7c..d86ac01a28 100644 --- a/cmake/XrplSanitizers.cmake +++ b/cmake/XrplSanitizers.cmake @@ -112,14 +112,6 @@ endif() # Compiler-specific configuration if(IS_GCC) - # Remove any -fuse-ld=... flags previously added to 'common' - get_target_property(_common_if_libs common INTERFACE_LINK_LIBRARIES) - if(_common_if_libs) - message(STATUS " Can't use mold with gcc while ASAN is enabled. Will use default linker (bfd/ld).") - list(REMOVE_ITEM _common_if_libs "-fuse-ld=mold" "-fuse-ld=gold" "-fuse-ld=lld") - set_target_properties(common PROPERTIES INTERFACE_LINK_LIBRARIES "${_common_if_libs}") - endif() - # Disable mold, gold and lld linkers for GCC with sanitizers # Use default linker (bfd/ld) which is more lenient with mixed code models set(use_mold OFF CACHE BOOL "Use mold linker" FORCE) diff --git a/cmake/XrplSettings.cmake b/cmake/XrplSettings.cmake index 2550e5a4e1..a272ddcef8 100644 --- a/cmake/XrplSettings.cmake +++ b/cmake/XrplSettings.cmake @@ -62,7 +62,7 @@ else() set(wextra OFF CACHE BOOL "gcc/clang only" FORCE) endif() -if(is_linux) +if(is_linux AND NOT $ENV{SANITIZERS}) option(BUILD_SHARED_LIBS "build shared xrpl libraries" OFF) option(static "link protobuf, openssl, libc++, and boost statically" ON) option(perf "Enables flags that assist with perf recording" OFF)