[llvm] 6496944 - [Support][cmake] Fix snmalloc integration. NFC.

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 15 12:19:49 PDT 2022


Author: Alexandre Ganea
Date: 2022-04-15T15:19:38-04:00
New Revision: 64969446bc27a955b77a3a4e9ee22af7043bcba1

URL: https://github.com/llvm/llvm-project/commit/64969446bc27a955b77a3a4e9ee22af7043bcba1
DIFF: https://github.com/llvm/llvm-project/commit/64969446bc27a955b77a3a4e9ee22af7043bcba1.diff

LOG: [Support][cmake] Fix snmalloc integration. NFC.

When using LLVM_INTEGRATED_CRT_ALLOC, fix compiling with the latest snmalloc at ToT (https://github.com/microsoft/snmalloc).

Added: 
    

Modified: 
    llvm/lib/Support/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt
index 7cbff3dddbcdf..4d9956ba8336c 100644
--- a/llvm/lib/Support/CMakeLists.txt
+++ b/llvm/lib/Support/CMakeLists.txt
@@ -90,7 +90,7 @@ if(LLVM_INTEGRATED_CRT_ALLOC)
     add_definitions(-DENABLE_OVERRIDE -DENABLE_PRELOAD)
     set(ALLOCATOR_FILES "${LLVM_INTEGRATED_CRT_ALLOC}/rpmalloc/rpmalloc.c")
   elseif(LLVM_INTEGRATED_CRT_ALLOC MATCHES "snmalloc$")
-    set(ALLOCATOR_FILES "${LLVM_INTEGRATED_CRT_ALLOC}/src/override/malloc.cc" "${LLVM_INTEGRATED_CRT_ALLOC}/src/override/new.cc")
+    set(ALLOCATOR_FILES "${LLVM_INTEGRATED_CRT_ALLOC}/src/snmalloc/override/new.cc")
     set(system_libs ${system_libs} "mincore.lib" "-INCLUDE:malloc")
   elseif(LLVM_INTEGRATED_CRT_ALLOC MATCHES "mimalloc$")
     set(MIMALLOC_LIB "${LLVM_INTEGRATED_CRT_ALLOC}/out/msvc-x64/Release/mimalloc-static.lib")


        


More information about the llvm-commits mailing list