mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:59:56 +00:00
[llvm][cmake] Change LLVM_INTEGRATED_CRT_ALLOC to a path instead of a boolean
Differential Revision: https://reviews.llvm.org/D87609
This commit is contained in:
parent
5c1dccafc2
commit
f0d611207d
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user