File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ option(SNMALLOC_USE_CXX17 "Build as C++17 for legacy support." OFF)
1818option (SNMALLOC_TRACING "Enable large quantities of debug output." OFF )
1919option (SNMALLOC_NO_REALLOCARRAY "Build without reallocarray exported" ON )
2020option (SNMALLOC_NO_REALLOCARR "Build without reallocarr exported" ON )
21+ option (SNMALLOC_LINK_ICF "Link with Identical Code Folding" ON )
2122# Options that apply only if we're not building the header-only library
2223cmake_dependent_option(SNMALLOC_RUST_SUPPORT "Build static library for rust" OFF "NOT SNMALLOC_HEADER_ONLY_LIBRARY" OFF )
2324cmake_dependent_option(SNMALLOC_STATIC_LIBRARY "Build static libraries" ON "NOT SNMALLOC_HEADER_ONLY_LIBRARY" OFF )
@@ -318,7 +319,7 @@ if(NOT SNMALLOC_HEADER_ONLY_LIBRARY)
318319 endif ()
319320 endif ()
320321 # Remove all the duplicate new/malloc and free/delete definitions
321- target_link_options (${name} PRIVATE $<$<BOOL :${LLD_WORKS} >:-Wl,--icf=all -fuse-ld=lld>)
322+ target_link_options (${name} PRIVATE $<$<BOOL :${LLD_WORKS} >:$<$< BOOL : ${SNMALLOC_LINK_ICF} >: -Wl,--icf=all > -fuse-ld=lld>)
322323 endif ()
323324
324325 target_compile_definitions (${name} PRIVATE
You can’t perform that action at this time.
0 commit comments