From 6d53c378ea00da7d65f27d31012c93729fb0e17a Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Wed, 14 Jul 2021 00:00:09 -0400 Subject: [PATCH] [mono][wasm] Avoid compiling llvm bitcode files with -emit-llvm. It causes the output to be a bitcode file as well, which is passed to the emscripten link step, which will compile it to wasm sequentially, slowing down linking. Fixes https://github.com/dotnet/runtime/issues/54935. --- src/mono/wasm/build/WasmApp.Native.targets | 1 + src/mono/wasm/wasm.proj | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mono/wasm/build/WasmApp.Native.targets b/src/mono/wasm/build/WasmApp.Native.targets index 4b8335a74d6d2a..dec82153779736 100644 --- a/src/mono/wasm/build/WasmApp.Native.targets +++ b/src/mono/wasm/build/WasmApp.Native.targets @@ -218,6 +218,7 @@ <_EmccCFlags Include="-DLINK_ICALLS=1" Condition="'$(WasmLinkIcalls)' == 'true'" /> <_EmccCFlags Include="-DCORE_BINDINGS" /> <_EmccCFlags Include="-DGEN_PINVOKE=1" /> + <_EmccCFlags Include="-emit-llvm" /> <_EmccCFlags Include=""-I%(_EmccIncludePaths.Identity)"" /> <_EmccCFlags Include="-g" Condition="'$(WasmNativeDebugSymbols)' == 'true'" /> diff --git a/src/mono/wasm/wasm.proj b/src/mono/wasm/wasm.proj index 45640378ac3cc4..b8ee77e5e2731e 100644 --- a/src/mono/wasm/wasm.proj +++ b/src/mono/wasm/wasm.proj @@ -69,7 +69,6 @@ <_EmccCommonFlags Include="-s "EXPORTED_RUNTIME_METHODS=['ccall', 'FS_createPath', 'FS_createDataFile', 'cwrap', 'setValue', 'getValue', 'UTF8ToString', 'UTF8ArrayToString', 'addFunction']"" /> <_EmccCommonFlags Include="-s "EXPORTED_FUNCTIONS=['_putchar']"" /> <_EmccCommonFlags Include="--source-map-base http://example.com" /> - <_EmccCommonFlags Include="-emit-llvm" /> <_EmccCommonFlags Include="-s MODULARIZE=1" Condition="'$(WasmEnableES6)' != 'false'" /> <_EmccCommonFlags Include="-s EXPORT_ES6=1" Condition="'$(WasmEnableES6)' != 'false'" />