diff options
author | Zoltan Varga <vargaz@gmail.com> | 2020-02-13 21:25:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-13 21:25:05 +0300 |
commit | 362cb3084f3b1734b9adb4b4d12fbc873b7d88a2 (patch) | |
tree | 8ca4ecfd06d57176b85cc05d7ff663485ca840e9 /sdks | |
parent | c03b6244e047f539625bc1ffa2cf080424c58ef7 (diff) |
[wasm] Avoid compiling release configuration with -s ASSERTIONS=1 in AOT mode, it generates a lot of extra code. (#18703)
* [wasm] Avoid compiling release configuration with -s ASSERTIONS=1 in AOT mode, it generates a lot of extra code.
* Update sdks/wasm/packager.cs
Co-Authored-By: Bernhard Urban-Forster <bernhard.urban@xamarin.com>
Co-authored-by: Bernhard Urban-Forster <bernhard.urban@xamarin.com>
Diffstat (limited to 'sdks')
-rw-r--r-- | sdks/wasm/packager.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sdks/wasm/packager.cs b/sdks/wasm/packager.cs index c0cf19eb7bb..4fba3fabf9f 100644 --- a/sdks/wasm/packager.cs +++ b/sdks/wasm/packager.cs @@ -820,6 +820,9 @@ class Driver { aot_args += "mattr=simd,"; emcc_flags += "-s SIMD=1 "; } + if (!use_release_runtime) + // -s ASSERTIONS=2 is very slow + emcc_flags += "-s ASSERTIONS=1 "; var ninja = File.CreateText (Path.Combine (builddir, "build.ninja")); @@ -852,8 +855,7 @@ class Driver { ninja.WriteLine ("cross = $mono_sdkdir/wasm-cross-release/bin/wasm32-unknown-none-mono-sgen"); ninja.WriteLine ("emcc = source $emsdk_env && emcc"); ninja.WriteLine ("wasm_strip = $emscripten_sdkdir/upstream/bin/wasm-strip"); - // -s ASSERTIONS=2 is very slow - ninja.WriteLine ($"emcc_flags = -Oz -g {emcc_flags}-s DISABLE_EXCEPTION_CATCHING=0 -s ASSERTIONS=1 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s BINARYEN=1 -s TOTAL_MEMORY=134217728 -s ALIASING_FUNCTION_POINTERS=0 -s NO_EXIT_RUNTIME=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s \"EXTRA_EXPORTED_RUNTIME_METHODS=[\'ccall\', \'cwrap\', \'setValue\', \'getValue\', \'UTF8ToString\']\" -s \"EXPORTED_FUNCTIONS=[\'___cxa_is_pointer_type\', \'___cxa_can_catch\']\" -s \"DEFAULT_LIBRARY_FUNCS_TO_INCLUDE=[\'setThrew\', \'memset\']\""); + ninja.WriteLine ($"emcc_flags = -Oz -g {emcc_flags}-s DISABLE_EXCEPTION_CATCHING=0 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s BINARYEN=1 -s TOTAL_MEMORY=134217728 -s ALIASING_FUNCTION_POINTERS=0 -s NO_EXIT_RUNTIME=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s \"EXTRA_EXPORTED_RUNTIME_METHODS=[\'ccall\', \'cwrap\', \'setValue\', \'getValue\', \'UTF8ToString\']\" -s \"EXPORTED_FUNCTIONS=[\'___cxa_is_pointer_type\', \'___cxa_can_catch\']\" -s \"DEFAULT_LIBRARY_FUNCS_TO_INCLUDE=[\'setThrew\', \'memset\']\""); ninja.WriteLine ($"aot_base_args = llvmonly,asmonly,no-opt,static,direct-icalls,deterministic,{aot_args}"); // Rules |