summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt8
-rw-r--r--external/CMakeLists.txt9
2 files changed, 7 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ab4556550..ae99959f7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -185,10 +185,16 @@ advanced_option(
"Build using system glslang library"
OFF
)
+if(WIN32)
+ set(SLANG_ENABLE_SPIRV_TOOLS_MIMALLOC_DEFAULT ON)
+else()
+ set(SLANG_ENABLE_SPIRV_TOOLS_MIMALLOC_DEFAULT OFF)
+endif()
+
advanced_option(
SLANG_ENABLE_SPIRV_TOOLS_MIMALLOC
"Enable mimalloc for SPIRV-Tools to improve compilation performance"
- OFF
+ ${SLANG_ENABLE_SPIRV_TOOLS_MIMALLOC_DEFAULT}
)
option(
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
index fed9e5e4e..e0dcdfb40 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
@@ -25,15 +25,6 @@ if(NOT SLANG_ENABLE_EXTERNAL_COMPILER_WARNINGS)
endif()
endif()
-# Option to enable mimalloc for SPIRV-Tools to improve compilation performance
-if(WIN32)
- option(
- SLANG_ENABLE_SPIRV_TOOLS_MIMALLOC
- "Enable mimalloc for SPIRV-Tools to improve compilation performance"
- ON
- )
-endif()
-
# Unordered dense
if(NOT ${SLANG_USE_SYSTEM_UNORDERED_DENSE})
if(NOT SLANG_OVERRIDE_UNORDERED_DENSE_PATH)