From abd43d59e978dc936637914f7869964af86d4d8c Mon Sep 17 00:00:00 2001 From: Amaury Chamayou Date: Tue, 7 Jan 2025 14:44:23 +0000 Subject: [PATCH] asan --- CMakeLists.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dc98dc075ad..63c7606f391 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -505,11 +505,19 @@ endif() add_custom_target(ccf ALL) set(CCF_IMPL_SOURCE - ${CCF_DIR}/src/host/snmalloc.cpp ${CCF_DIR}/src/enclave/main.cpp - ${CCF_DIR}/src/enclave/enclave_time.cpp + ${CCF_DIR}/src/enclave/main.cpp ${CCF_DIR}/src/enclave/enclave_time.cpp ${CCF_DIR}/src/enclave/thread_local.cpp ${CCF_DIR}/src/node/quote.cpp ) +if(SAN + OR TSAN + OR NOT USE_SNMALLOC +) + # Do nothing, SNMALLOC_COMPILE_OPTIONS is empty already +else() + list(APPEND CCF_IMPL_SOURCE ${CCF_DIR}/src/host/snmalloc.cpp) +endif() + # Same as virtual for the time being but will diverge soon if(COMPILE_TARGET STREQUAL "snp")