[wasm] Rename `$(EmccInitialMemory)` to `$(EmccInitialHeapSize)` (#66233)
authorAnkit Jain <radical@gmail.com>
Mon, 7 Mar 2022 22:33:42 +0000 (17:33 -0500)
committerGitHub <noreply@github.com>
Mon, 7 Mar 2022 22:33:42 +0000 (17:33 -0500)
.. to better represent what it is.

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

index 17cddce..3b00590 100644 (file)
       <_EmccCompileBitcodeRsp>$(_WasmIntermediateOutputPath)emcc-compile-bc.rsp</_EmccCompileBitcodeRsp>
       <_EmccLinkRsp>$(_WasmIntermediateOutputPath)emcc-link.rsp</_EmccLinkRsp>
 
-      <EmccInitialMemory Condition="'$(EmccInitialMemory)' == ''">$(EmccTotalMemory)</EmccInitialMemory>
-      <EmccInitialMemory Condition="'$(EmccInitialMemory)' == ''">536870912</EmccInitialMemory>
+      <EmccInitialHeapSize Condition="'$(EmccInitialHeapSize)' == ''">$(EmccTotalMemory)</EmccInitialHeapSize>
+      <EmccInitialHeapSize Condition="'$(EmccInitialHeapSize)' == ''">536870912</EmccInitialHeapSize>
     </PropertyGroup>
 
     <ItemGroup>
       <_EmccLDFlags Include="$(EmccLinkOptimizationFlag)" />
       <_EmccLDFlags Include="@(_EmccCommonFlags)" />
       <_EmccLDFlags Include="-Wl,--allow-undefined" />
-      <_EmccLDSFlags Include="-s INITIAL_MEMORY=$(EmccInitialMemory)" />
+      <_EmccLDSFlags Include="-s INITIAL_MEMORY=$(EmccInitialHeapSize)" />
 
       <!-- ILLinker should have removed unused imports, so error for Publish -->
       <_EmccLDSFlags Include="-s ERROR_ON_UNDEFINED_SYMBOLS=0" Condition="'$(WasmBuildingForNestedPublish)' != 'true'" />
index b062cc3..969a545 100644 (file)
@@ -51,7 +51,8 @@
       - $(EmccFlags)                        - Emcc flags used for both compiling native files, and linking
       - $(EmccExtraLDFlags)                 - Extra emcc flags for linking
       - $(EmccExtraCFlags)                  - Extra emcc flags for compiling native files
-      - $(EmccInitialMemory)                - Initial memory specified with `emcc`. Default value: 536870912
+      - $(EmccInitialHeapSize)              - Initial heap size specified with `emcc`. Default value: 536870912
+                                              Corresponds to `INITIAL_MEMORY` arg for emcc.
                                               (previously named EmccTotalMemory, which is still kept as an alias)
 
       - $(WasmBuildAppAfterThisTarget)      - This target is used as `AfterTargets` for `WasmBuildApp. this