diff options
Diffstat (limited to 'lib/scudo')
-rw-r--r-- | lib/scudo/CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/scudo/CMakeLists.txt b/lib/scudo/CMakeLists.txt index 29e6795a5..0aba0cad1 100644 --- a/lib/scudo/CMakeLists.txt +++ b/lib/scudo/CMakeLists.txt @@ -9,6 +9,10 @@ append_rtti_flag(OFF SCUDO_CFLAGS) set(SCUDO_DYNAMIC_LINK_FLAGS ${SANITIZER_COMMON_LINK_FLAGS}) +# Use gc-sections by default to avoid unused code being pulled in. +list(APPEND SCUDO_CFLAGS -ffunction-sections -fdata-sections) +list(APPEND SCUDO_DYNAMIC_LINK_FLAGS -Wl,--gc-sections) + set(SCUDO_SOURCES scudo_allocator.cpp scudo_crc32.cpp |