Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wasm] Support mono runtime components #55680

Merged
merged 8 commits into from
Jul 15, 2021
Merged
11 changes: 8 additions & 3 deletions src/mono/wasm/build/WasmApp.Native.targets
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,11 @@
<EmccCompile SourceFiles="@(_WasmSourceFileToCompile)" Arguments='"@$(_EmccDefaultFlagsRsp)" "@$(_EmccCompileRsp)"' EnvironmentVariables="@(EmscriptenEnvVars)" />
</Target>

<Target Name="_WasmLinkDotNet">
<ItemGroup Condition="'$(Configuration)' == 'Debug'">
<_MonoComponent Include="hot_reload;diagnostics_tracing;debugger" />
radekdoulik marked this conversation as resolved.
Show resolved Hide resolved
</ItemGroup>

<Target Name="_WasmLinkDotNet" DependsOnTargets="_MonoSelectRuntimeComponents ">
lewing marked this conversation as resolved.
Show resolved Hide resolved
<ItemGroup>
<!-- Adding optimization flag at the top, so it gets precedence -->
<_EmccLDFlags Include="$(EmccLinkOptimizationFlag)" />
Expand All @@ -258,8 +262,9 @@
<_WasmNativeFileForLinking Include="%(_BitcodeFile.ObjectFile)" />
<_WasmNativeFileForLinking Include="%(_WasmSourceFileToCompile.ObjectFile)" />

<!-- libmono* needs to be at the end, since it is used to resolve references the previous .o files -->
<_WasmNativeFileForLinking Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)\*.a" />
<_WasmNativeFileForLinking
Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)\*.a"
Exclude="@(_MonoRuntimeComponentDontLink->'$(MicrosoftNetCoreAppRuntimePackRidNativeDir)\%(Identity)')" />

<_EmccLinkStepArgs Include="@(_EmccLDFlags)" />
<_EmccLinkStepArgs Include="--js-library &quot;%(_DotnetJSSrcFile.Identity)&quot;" />
Expand Down