Skip to content

Commit

Permalink
[mono][wasm] Avoid compiling llvm bitcode files with -emit-llvm.
Browse files Browse the repository at this point in the history
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 dotnet#54935.
  • Loading branch information
vargaz committed Jul 14, 2021
1 parent f6eb259 commit 6d53c37
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions src/mono/wasm/build/WasmApp.Native.targets
Original file line number Diff line number Diff line change
Expand Up @@ -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="&quot;-I%(_EmccIncludePaths.Identity)&quot;" />
<_EmccCFlags Include="-g" Condition="'$(WasmNativeDebugSymbols)' == 'true'" />
Expand Down
1 change: 0 additions & 1 deletion src/mono/wasm/wasm.proj
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
<_EmccCommonFlags Include="-s &quot;EXPORTED_RUNTIME_METHODS=['ccall', 'FS_createPath', 'FS_createDataFile', 'cwrap', 'setValue', 'getValue', 'UTF8ToString', 'UTF8ArrayToString', 'addFunction']&quot;" />
<_EmccCommonFlags Include="-s &quot;EXPORTED_FUNCTIONS=['_putchar']&quot;" />
<_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'" />
Expand Down

0 comments on commit 6d53c37

Please sign in to comment.