From 92ca9184886f983bb1cf9f4614c9569db442d097 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 20 Oct 2025 10:27:12 +0100 Subject: [PATCH] Remove interface linking for PRIVATE linkage (#799) --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index aea61c4..cad25ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -509,6 +509,11 @@ if(NOT SNMALLOC_HEADER_ONLY_LIBRARY) function(compile name TYPE ${ARGN}) add_library(${name} ${TYPE} ${ARGN}) target_link_libraries(${name} PRIVATE snmalloc) + + # PRIVATE linking still touches INTERFACE level linking for unknown reasons. + # Check https://github.com/microsoft/snmalloc/pull/799 for details. + set_target_properties(${name} PROPERTIES INTERFACE_LINK_LIBRARIES "") + target_compile_definitions(${name} PRIVATE "SNMALLOC_USE_${SNMALLOC_CLEANUP}") add_warning_flags(${name})