Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Prev Previous commit
Next Next commit
fix
  • Loading branch information
pavelsavara committed Jul 22, 2024
commit 09934affd59fcad7ac5d2a273b2d8b98aa36018f
2 changes: 1 addition & 1 deletion src/mono/wasi/build/WasiApp.targets
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@
<_WasiLinkStepArgs Condition="'$(OS)' != 'Windows_NT'" Include="@(_WasiFilePathForFixup -> '&quot;%(Identity)&quot;')" />

<_WasiLinkStepArgs Include="-Wl,--export=malloc,--export=free,--export=__heap_base,--export=__data_end" />
<!-- keep in sync with src\mono\wasi\build\WasiApp.Native.targets -->
<!-- keep in sync with src\mono\wasi\wasi.proj -->
<!-- keep in sync with src\native\libs\CMakeLists.txt -->
<_WasiLinkStepArgs Include="-Wl,-z,stack-size=8388608,-lwasi-emulated-process-clocks,-lwasi-emulated-signal,-lwasi-emulated-mman"/>
<!-- TODO this makes hard dependency on wasi:[email protected], ideally this would be trimmable when HTTP is not used -->
Expand Down
7 changes: 4 additions & 3 deletions src/mono/wasi/wasi.proj
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,9 @@
<_WasiCompileFlags Include="-D_WASI_EMULATED_PROCESS_CLOCKS"/>
<_WasiCompileFlags Include="-D_WASI_EMULATED_SIGNAL"/>
<_WasiCompileFlags Include="-D_WASI_EMULATED_MMAN"/>
<!-- keep in sync with src\mono\wasi\build\WasiApp.Native.targets -->
<!-- keep in sync with src\mono\wasi\build\WasiApp.targets -->
<!-- keep in sync with src\native\libs\CMakeLists.txt -->
<_WasiLinkFlags Include="-Wl,-z,stack-size=8388608,--initial-memory=52428800,-lwasi-emulated-process-clocks,-lwasi-emulated-signal,-lwasi-emulated-mman"/>
<!-- this makes hard dependency on wasi:[email protected] for the default build of dotnet.wasm. It would be ideal to have optional imports instead, but WASI doesn't support it yet -->
<_WasiLinkFlags Include="-Wl,--component-type,&quot;$([MSBuild]::NormalizePath('$(RepoRoot)', 'src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld_component_type.wit').Replace('\','/'))&quot;"/>
</ItemGroup>

<PropertyGroup>
Expand Down Expand Up @@ -215,6 +213,9 @@
<CMakeConfigurationLinkFlags Condition="'$(Configuration)' == 'Debug'" >$(CMakeConfigurationWasiFlags)</CMakeConfigurationLinkFlags>
<CMakeConfigurationLinkFlags Condition="'$(Configuration)' == 'Release'">-O2</CMakeConfigurationLinkFlags>

<!-- this makes hard dependency on wasi:[email protected] for the default build of dotnet.wasm. It would be ideal to have optional imports instead, but WASI doesn't support it yet -->
<CMakeConfigurationLinkFlags>$(CMakeBuildRuntimeConfigureCmd) -Wl,--component-type,&quot;$([MSBuild]::NormalizePath('$(RepoRoot)', 'src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld_component_type.wit').Replace('\','/'))&quot;</CMakeConfigurationLinkFlags>

<CMakeBuildRuntimeConfigureCmd>cmake $(MSBuildThisFileDirectory)runtime</CMakeBuildRuntimeConfigureCmd>
<CMakeBuildRuntimeConfigureCmd Condition="'$(OS)' == 'Windows_NT'">cmake -G Ninja $(MSBuildThisFileDirectory)runtime</CMakeBuildRuntimeConfigureCmd>

Expand Down
2 changes: 1 addition & 1 deletion src/native/libs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ if (CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_BROWSER OR CLR_CMAKE_TARGET_WASI)
add_compile_options(-D_WASI_EMULATED_PROCESS_CLOCKS)
add_compile_options(-D_WASI_EMULATED_SIGNAL)
add_compile_options(-D_WASI_EMULATED_MMAN)
# keep in sync with src\mono\wasi\build\WasiApp.Native.targets
# keep in sync with src\mono\wasi\build\WasiApp.targets
# keep in sync with src\mono\wasi\wasi.proj
add_link_options(-Wl,-z,stack-size=1048576,--initial-memory=5242880,--max-memory=52428800,-lwasi-emulated-process-clocks,-lwasi-emulated-signal,-lwasi-emulated-mman)
endif ()
Expand Down