Skip to content

Commit 3f341e5

Browse files
authored
Exclude the mimalloc files from the Binaryen install (WebAssembly#7386)
Since mimalloc is linked statically into the Binaryen tools, none of its files need to be installed with Binaryen. Also use CMAKE_SYSTEM_NAME instead of LINUX, as the latter was introduced in CMake 3.25
1 parent d98e3c4 commit 3f341e5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ if(BUILD_LLVM_DWARF)
468468
endif()
469469

470470
if(MIMALLOC_STATIC)
471-
if(NOT(LINUX AND BUILD_STATIC_LIB) OR EMSCRIPTEN)
471+
if(NOT(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND BUILD_STATIC_LIB) OR EMSCRIPTEN)
472472
message(FATAL_ERROR "Statically linking mimalloc is only supported when building as a native, statically linked library on Linux.")
473473
endif()
474474
message(STATUS "Building with statically linked mimalloc allocator.")

third_party/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ if(MIMALLOC_STATIC)
2626
# (They can still be enabled via MIMALLOC_VERBOSE=1 wasm-opt ...)
2727
add_compile_definitions(MI_DEBUG=0)
2828

29-
add_subdirectory(mimalloc)
29+
add_subdirectory(mimalloc EXCLUDE_FROM_ALL)
3030
endif()

0 commit comments

Comments
 (0)