mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
[wasm] allows to specify MALLOC setting for wasm build (#7934)
This commit is contained in:
parent
6a9023f47d
commit
0723d16436
2 changed files with 4 additions and 0 deletions
|
|
@ -51,6 +51,7 @@ set_target_properties(onnxruntime_webassembly PROPERTIES LINK_FLAGS "
|
|||
-s LLD_REPORT_UNDEFINED \
|
||||
-s VERBOSE=0 \
|
||||
-s NO_FILESYSTEM=1 \
|
||||
-s MALLOC=${onnxruntime_WEBASSEMBLY_MALLOC} \
|
||||
--no-entry")
|
||||
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
|
|
|
|||
|
|
@ -346,6 +346,8 @@ def parse_arguments():
|
|||
parser.add_argument(
|
||||
"--enable_wasm_debug_info", action='store_true',
|
||||
help="Build WebAssembly with DWARF format debug info")
|
||||
parser.add_argument(
|
||||
"--wasm_malloc", default="dlmalloc", help="Specify memory allocator for WebAssembly")
|
||||
|
||||
# Arguments needed by CI
|
||||
parser.add_argument(
|
||||
|
|
@ -750,6 +752,7 @@ def generate_build_tree(cmake_path, source_dir, build_dir, cuda_home, cudnn_home
|
|||
else "ON"),
|
||||
"-Donnxruntime_ENABLE_WEBASSEMBLY_THREADS=" + ("ON" if args.enable_wasm_threads else "OFF"),
|
||||
"-Donnxruntime_ENABLE_WEBASSEMBLY_DEBUG_INFO=" + ("ON" if args.enable_wasm_debug_info else "OFF"),
|
||||
"-Donnxruntime_WEBASSEMBLY_MALLOC=" + args.wasm_malloc,
|
||||
"-Donnxruntime_ENABLE_EAGER_MODE=" + ("ON" if args.build_eager_mode else "OFF"),
|
||||
]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue