@@ -117,6 +117,11 @@ endif()
117
117
# This option controls whether to link virtual builds against snmalloc rather
118
118
# than use the system allocator.
119
119
option (USE_SNMALLOC "Link against snmalloc" ON )
120
+ if (USE_SNMALLOC )
121
+ set (SNMALLOC_BUILD_TESTING OFF )
122
+ set (SNMALLOC_STATIC_LIBRARY_PREFIX "" )
123
+ add_subdirectory (3rdparty/exported/snmalloc EXCLUDE_FROM_ALL )
124
+ endif ()
120
125
121
126
# Useful for debugging with libc++ hardening options
122
127
option (USE_LIBCXX "Use libc++ instead of libstdc++" OFF )
@@ -208,19 +213,6 @@ include(${CCF_DIR}/cmake/qcbor.cmake)
208
213
include (${CCF_DIR} /cmake/t_cose.cmake )
209
214
210
215
# Launcher library
211
- if (SAN
212
- OR TSAN
213
- OR NOT USE_SNMALLOC
214
- )
215
- set (SNMALLOC_COMPILE_OPTIONS "" )
216
- else ()
217
- set (SNMALLOC_HEADER_ONLY_LIBRARY ON )
218
- add_subdirectory (3rdparty/exported/snmalloc EXCLUDE_FROM_ALL )
219
- set (SNMALLOC_COMPILE_OPTIONS "-mcx16" )
220
- set (SNMALLOC_INCLUDE_DIRS 3rdparty/exported/snmalloc/src )
221
- list (APPEND CCF_LAUNCHER_SOURCES src/host/snmalloc.cpp )
222
- endif ()
223
-
224
216
list (APPEND CCF_LAUNCHER_SOURCES ${CCF_DIR} /src/host/run.cpp
225
217
${CCF_DIR} /src/host/env.cpp
226
218
)
@@ -238,10 +230,7 @@ add_ccf_static_library(
238
230
http_parser
239
231
)
240
232
241
- target_include_directories (
242
- ccf_launcher PRIVATE ${CCF_GENERATED_DIR} ${SNMALLOC_INCLUDE_DIRS}
243
- )
244
- target_compile_options (ccf_launcher PRIVATE ${SNMALLOC_COMPILE_OPTIONS} )
233
+ target_include_directories (ccf_launcher PRIVATE ${CCF_GENERATED_DIR} )
245
234
246
235
# HTTP parser
247
236
add_library (http_parser "${HTTP_PARSER_SOURCES} " )
0 commit comments