diff options
| author | Gangzheng Tong <tonggangzheng@gmail.com> | 2025-09-15 18:46:59 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-16 01:46:59 +0000 |
| commit | 8ad0ae17880480abe587617c997ab28b23abc146 (patch) | |
| tree | 2e4449d239d26f30e95520a6ff7bf5aac814924f /CMakeLists.txt | |
| parent | 8bcf6c443bbd24498e67ae54f06c2ad933421738 (diff) | |
Enable static mimalloc in Spriv-Tools (#8419)
* Added optional mimalloc integration for SPIRV-Tools to improve
compilation performance
* Cloning `mimalloc` repo to external/ on demand during cmake config
* Enabled by default on Windows, configurable via
`SLANG_ENABLE_SPIRV_TOOLS_MIMALLOC` CMake option, to enable static
mimalloc build in spirv-tools.
* There are some crashes in Linux and Mac with static mimalloc enabled,
likely due to the system malloc and mimalloc mixed usage. This might be
expected as mimalloc in spirv-tools is not extensively tested according
to
https://github.com/KhronosGroup/SPIRV-Tools?tab=readme-ov-file#dependency-on-mimalloc.
So by default only Windows has this enabled.
Close: https://github.com/shader-slang/slang/issues/8158
---------
Co-authored-by: slangbot <ellieh+slangbot@nvidia.com>
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ab208c2b..ab4556550 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -185,6 +185,11 @@ advanced_option( "Build using system glslang library" OFF ) +advanced_option( + SLANG_ENABLE_SPIRV_TOOLS_MIMALLOC + "Enable mimalloc for SPIRV-Tools to improve compilation performance" + OFF +) option( SLANG_SPIRV_HEADERS_INCLUDE_DIR |
