Skip to content

Commit a256c3c

Browse files
committed
simpler version of dotnet#80507
1 parent 7db1c33 commit a256c3c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/mono/wasm/build/WasmApp.Native.targets

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@
185185
<_EmccLinkRsp>$(_WasmIntermediateOutputPath)emcc-link.rsp</_EmccLinkRsp>
186186

187187
<EmccInitialHeapSize Condition="'$(EmccInitialHeapSize)' == ''">$(EmccTotalMemory)</EmccInitialHeapSize>
188-
<EmccInitialHeapSize Condition="'$(EmccInitialHeapSize)' == ''">536870912</EmccInitialHeapSize>
189188
</PropertyGroup>
190189

191190
<ItemGroup>
@@ -227,7 +226,6 @@
227226
<_EmccLDFlags Include="-s ASSERTIONS=$(_EmccAssertionLevelDefault)" Condition="'$(_WasmDevel)' == 'true'" />
228227
<_EmccLDFlags Include="@(_EmccCommonFlags)" />
229228
<_EmccLDFlags Include="-Wl,--allow-undefined" />
230-
<_EmccLDSFlags Include="-s INITIAL_MEMORY=$(EmccInitialHeapSize)" />
231229

232230
<!-- ILLinker should have removed unused imports, so error for Publish -->
233231
<_EmccLDSFlags Include="-s ERROR_ON_UNDEFINED_SYMBOLS=0" Condition="'$(WasmBuildingForNestedPublish)' != 'true'" />
@@ -374,9 +372,12 @@
374372
<_WasmEHLib Condition="'$(WasmEnableExceptionHandling)' != 'true'">libmono-wasm-eh-js.a</_WasmEHLib>
375373
<_WasmEHLibToExclude Condition="'$(WasmEnableExceptionHandling)' == 'true'">libmono-wasm-eh-js.a</_WasmEHLibToExclude>
376374
<_WasmEHLibToExclude Condition="'$(WasmEnableExceptionHandling)' != 'true'">libmono-wasm-eh-wasm.a</_WasmEHLibToExclude>
375+
<EmccInitialHeapSize Condition="'$(EmccInitialHeapSize)' == '' and '$(_WasmShouldAOT)' != 'true'">16777216</EmccInitialHeapSize>
376+
<EmccInitialHeapSize Condition="'$(EmccInitialHeapSize)' == '' and '$(_WasmShouldAOT)' == 'true'">134217728</EmccInitialHeapSize>
377377
</PropertyGroup>
378378
<ItemGroup>
379379
<!-- order matters -->
380+
<_EmccLDSFlags Include="-s INITIAL_MEMORY=$(EmccInitialHeapSize)" />
380381
<_WasmNativeFileForLinking Include="%(_BitcodeFile.ObjectFile)" />
381382
<_WasmNativeFileForLinking Include="%(_WasmSourceFileToCompile.ObjectFile)" />
382383

0 commit comments

Comments
 (0)