[llvm] [Support] Vendor rpmalloc in-tree and use it for the Windows 64-bit release (PR #91862)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 21 03:33:07 PDT 2024
================
@@ -733,7 +733,24 @@ if( WIN32 AND NOT CYGWIN )
endif()
set(LLVM_NATIVE_TOOL_DIR "" CACHE PATH "Path to a directory containing prebuilt matching native tools (such as llvm-tblgen)")
-set(LLVM_INTEGRATED_CRT_ALLOC "" CACHE PATH "Replace the Windows CRT allocator with any of {rpmalloc|mimalloc|snmalloc}. Only works with CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded.")
+set(LLVM_ENABLE_RPMALLOC "" CACHE BOOL "Replace the CRT allocator with rpmalloc.")
+if(LLVM_ENABLE_RPMALLOC)
+ if(NOT (CMAKE_SYSTEM_NAME MATCHES "Windows|Linux"))
+ message(FATAL_ERROR "LLVM_ENABLE_RPMALLOC is only supported on Windows and Linux.")
+ endif()
+ if(LLVM_USE_SANITIZER)
+ message(FATAL_ERROR "LLVM_ENABLE_RPMALLOC cannot be used along with LLVM_USE_SANITIZER!")
+ endif()
+ if(WIN32 AND CMAKE_BUILD_TYPE AND uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
+ message(FATAL_ERROR "The Debug target isn't supported along with LLVM_ENABLE_RPMALLOC!")
+ endif()
----------------
jayfoad wrote:
What's the problem with debug builds? Has this been discussed or described elsewhere?
https://github.com/llvm/llvm-project/pull/91862
More information about the llvm-commits
mailing list