File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77[submodule "third_party/fuzztest "]
88 path = third_party/fuzztest
99 url = https://github.com/google/fuzztest
10+ [submodule "third_party/mimalloc "]
11+ path = third_party/mimalloc
12+ url = https://github.com/microsoft/mimalloc.git
Original file line number Diff line number Diff line change @@ -446,6 +446,9 @@ if(BUILD_STATIC_LIB)
446446 message (STATUS "Building libbinaryen as statically linked library." )
447447 add_library (binaryen STATIC )
448448 add_definitions (-DBUILD_STATIC_LIBRARY )
449+
450+ message (STATUS "Using mimalloc for static build to avoid bad musl libc allocator performance." )
451+ target_link_libraries (binaryen mimalloc-static )
449452else ()
450453 message (STATUS "Building libbinaryen as shared library." )
451454 add_library (binaryen SHARED )
Original file line number Diff line number Diff line change @@ -15,3 +15,7 @@ endif()
1515if (BUILD_LLVM_DWARF)
1616 add_subdirectory (llvm-project )
1717endif ()
18+
19+ if (BUILD_STATIC_LIB)
20+ add_subdirectory (mimalloc )
21+ endif ()
You can’t perform that action at this time.
0 commit comments