[llvm] 50ee05a - [llvm][cmake] Change LLVM_INTEGRATED_CRT_ALLOC to a path instead of a boolean
Alexandre Ganea via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 15 16:19:06 PDT 2020
Author: Alexandre Ganea
Date: 2020-09-15T19:18:52-04:00
New Revision: 50ee05ab65db2ab262436ee0f92f7888607a89f3
URL: https://github.com/llvm/llvm-project/commit/50ee05ab65db2ab262436ee0f92f7888607a89f3
DIFF: https://github.com/llvm/llvm-project/commit/50ee05ab65db2ab262436ee0f92f7888607a89f3.diff
LOG: [llvm][cmake] Change LLVM_INTEGRATED_CRT_ALLOC to a path instead of a boolean
Differential Revision: https://reviews.llvm.org/D87609
Added:
Modified:
llvm/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 410103b0bfd6..4ae7bc14d3bb 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -514,6 +514,19 @@ if( WIN32 AND NOT CYGWIN )
set(LLVM_LIT_TOOLS_DIR "" CACHE PATH "Path to GnuWin32 tools")
endif()
+set(LLVM_INTEGRATED_CRT_ALLOC "" CACHE PATH "Replace the Windows CRT allocator with any of {rpmalloc|mimalloc|snmalloc}. Only works with /MT enabled.")
+if(LLVM_INTEGRATED_CRT_ALLOC)
+ if(NOT WIN32)
+ message(FATAL_ERROR "LLVM_INTEGRATED_CRT_ALLOC is only supported on Windows.")
+ endif()
+ if(LLVM_USE_SANITIZER)
+ message(FATAL_ERROR "LLVM_INTEGRATED_CRT_ALLOC cannot be used along with LLVM_USE_SANITIZER!")
+ endif()
+ if(CMAKE_BUILD_TYPE AND uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
+ message(FATAL_ERROR "The Debug target isn't supported along with LLVM_INTEGRATED_CRT_ALLOC!")
+ endif()
+endif()
+
# Define options to control the inclusion and default build behavior for
# components which may not strictly be necessary (tools, examples, and tests).
#
@@ -567,19 +580,6 @@ option (LLVM_BUILD_EXTERNAL_COMPILER_RT
option (LLVM_VERSION_PRINTER_SHOW_HOST_TARGET_INFO
"Show target and host info when tools are invoked with --version." ON)
-option(LLVM_INTEGRATED_CRT_ALLOC "Replace the Windows CRT allocator with any of {rpmalloc|mimalloc|snmalloc}. Only works with /MT enabled." OFF)
-if(LLVM_INTEGRATED_CRT_ALLOC)
- if(NOT WIN32)
- message(FATAL_ERROR "LLVM_INTEGRATED_CRT_ALLOC is only supported on Windows.")
- endif()
- if(LLVM_USE_SANITIZER)
- message(FATAL_ERROR "LLVM_INTEGRATED_CRT_ALLOC cannot be used along with LLVM_USE_SANITIZER!")
- endif()
- if(CMAKE_BUILD_TYPE AND uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
- message(FATAL_ERROR "The Debug target isn't supported along with LLVM_INTEGRATED_CRT_ALLOC!")
- endif()
-endif()
-
# You can configure which libraries from LLVM you want to include in the
# shared library by setting LLVM_DYLIB_COMPONENTS to a semi-colon delimited
# list of LLVM components. All component names handled by llvm-config are valid.
More information about the llvm-commits
mailing list