[llvm] c733421 - Hook in to LLVM_INTEGRATED_CRT_ALLOC=scudo
Russell Gallop via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 28 04:22:47 PST 2021
Author: Russell Gallop
Date: 2021-01-07T17:37:19Z
New Revision: c733421baf8df53cdfa238a3a7df47bc10f48421
URL: https://github.com/llvm/llvm-project/commit/c733421baf8df53cdfa238a3a7df47bc10f48421
DIFF: https://github.com/llvm/llvm-project/commit/c733421baf8df53cdfa238a3a7df47bc10f48421.diff
LOG: Hook in to LLVM_INTEGRATED_CRT_ALLOC=scudo
Slightly kludgy
Just hook in malloc, ignore new for now.
Suppress check for integrated_crt_alloc path
Change usage so LLVM_INTEGRATED_CRT_ALLOC is path to scudo lib rather than a hard-coded string
Add check for existence of scudo library
Remove check again, checked further up
Added:
Modified:
llvm/lib/Support/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt
index cdee11412eb5..9e831d1dc063 100644
--- a/llvm/lib/Support/CMakeLists.txt
+++ b/llvm/lib/Support/CMakeLists.txt
@@ -58,7 +58,7 @@ if(LLVM_INTEGRATED_CRT_ALLOC)
string(REGEX REPLACE "(/|\\\\)$" "" LLVM_INTEGRATED_CRT_ALLOC "${LLVM_INTEGRATED_CRT_ALLOC}")
if(NOT EXISTS "${LLVM_INTEGRATED_CRT_ALLOC}")
- message(FATAL_ERROR "Cannot find the path to `git clone` for the CRT allocator! (${LLVM_INTEGRATED_CRT_ALLOC}). Currently, rpmalloc, snmalloc and mimalloc are supported.")
+ message(FATAL_ERROR "Cannot find the path to `git clone` for the CRT allocator! (${LLVM_INTEGRATED_CRT_ALLOC}). Currently, rpmalloc, snmalloc, mimalloc and scudo are supported.")
endif()
if(LLVM_INTEGRATED_CRT_ALLOC MATCHES "rpmalloc$")
@@ -73,6 +73,8 @@ if(LLVM_INTEGRATED_CRT_ALLOC)
message(FATAL_ERROR "Cannot find the mimalloc static library. To build it, first apply the patch from https://github.com/microsoft/mimalloc/issues/268 then build the Release x64 target through ${LLVM_INTEGRATED_CRT_ALLOC}\\ide\\vs2019\\mimalloc.sln")
endif()
set(system_libs ${system_libs} "${MIMALLOC_LIB}" "-INCLUDE:malloc")
+ elseif(LLVM_INTEGRATED_CRT_ALLOC MATCHES "scudo")
+ set(system_libs ${system_libs} "${LLVM_INTEGRATED_CRT_ALLOC}" "-INCLUDE:malloc")
endif()
endif()
More information about the llvm-commits
mailing list