Skip to content

Commit

Permalink
Workaround wasm-opt crash
Browse files Browse the repository at this point in the history
  • Loading branch information
radekdoulik committed Jun 5, 2024
1 parent 4530edf commit 200cf3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/mono/browser/build/BrowserWasmApp.targets
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,10 @@
<WasmCompileOptimizationFlag>$(EmccCompileOptimizationFlag)</WasmCompileOptimizationFlag>
<WasmBitcodeCompileOptimizationFlag Condition="'$(WasmBitcodeCompileOptimizationFlag)' == '' and '$(Configuration)' == 'Release'">-O2</WasmBitcodeCompileOptimizationFlag>
<WasmBitcodeCompileOptimizationFlag Condition="'$(WasmBitcodeCompileOptimizationFlag)' == '' ">$(WasmCompileOptimizationFlag)</WasmBitcodeCompileOptimizationFlag>

<!-- fixme https://github.com/WebAssembly/binaryen/issues/6639 -->
<EmccLinkOptimizationFlag Condition="$([MSBuild]::IsOSPlatform('windows'))">-O1</EmccLinkOptimizationFlag>

<EmccLinkOptimizationFlag Condition="'$(EmccLinkOptimizationFlag)' == '' and '$(Configuration)' == 'Release'">-O2</EmccLinkOptimizationFlag>
<EmccLinkOptimizationFlag Condition="'$(EmccLinkOptimizationFlag)' == ''" >$(WasmCompileOptimizationFlag)</EmccLinkOptimizationFlag>
<WasmLinkOptimizationFlag>$(EmccLinkOptimizationFlag)</WasmLinkOptimizationFlag>
Expand Down
2 changes: 1 addition & 1 deletion src/mono/wasm/build/WasmApp.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@
<WasmOptConfigurationFlags Include="@(_DefaulWasmOptConfigurationFlags)" />

<!-- fixme: https://github.com/WebAssembly/binaryen/issues/6639 -->
<WasmOptConfigurationFlags Include="-O1" Condition="!$([MSBuild]::IsOSPlatform('windows'))" />
<WasmOptConfigurationFlags Include="-O1" Condition="$([MSBuild]::IsOSPlatform('windows'))" />
</ItemGroup>
</Target>

Expand Down

0 comments on commit 200cf3b

Please sign in to comment.