Skip to content

Commit

Permalink
Add build workaround for Python bindings on Windows when used with ot…
Browse files Browse the repository at this point in the history
…her packages that depend on old VC redist versions
  • Loading branch information
MikePopoloski committed Oct 20, 2024
1 parent cd86f6b commit 9b3e779
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,15 @@ if(SLANG_FUZZ_TARGET)
add_compile_definitions(SLANG_ASSERT_ENABLED)
endif()

# mimalloc is incompatible with Python bindings
if(SLANG_INCLUDE_PYLIB)
# mimalloc is incompatible with Python bindings
set(SLANG_USE_MIMALLOC OFF)

if(CMAKE_SYSTEM_NAME MATCHES "Windows")
# Workaround incompatibilities with old MSVC runtimes that are distributed
# with some Python packages like PyQt6
add_compile_definitions(_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)
endif()
endif()

# Get sane install RPATH handling by default if none has been provided.
Expand Down

0 comments on commit 9b3e779

Please sign in to comment.