Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8debc4a
Enable non-AOT WBT tests on CoreCLR in 4 native test classes
maraf Apr 22, 2026
65e6237
Enable ICU, InvariantGlobalization, and Memory tests on CoreCLR
Copilot Apr 24, 2026
1fa4950
Add newly enabled WBT classes to CoreCLR Helix jobs list
maraf Apr 24, 2026
123b863
Fix WBT template install on read-only Helix correlation
maraf Apr 24, 2026
5250927
Fix WBT template install DOTNET_CLI_HOME mismatch on Helix
maraf Apr 27, 2026
14cace4
Fix WBT CoreCLR native relink, ICU pack lookup, variadic test scope
maraf Apr 27, 2026
e17204d
Ship coreclr_compat.h as a static file next to BrowserWasmApp.CoreCLR…
maraf Apr 27, 2026
1eb48af
Use ICU-specific main.js for Wasm.Build.Tests IcuTests
maraf Apr 29, 2026
418cd2b
Split emcc compile pass for user vs generated sources in CoreCLR-Wasm
maraf Apr 29, 2026
827800e
Merge remote-tracking branch 'origin/main' into maraf/wbt-coreclr-ena…
maraf Apr 29, 2026
532e645
Ship minipal/utils.h to WBT Helix payload for CoreCLR re-link
May 5, 2026
7509361
Resolve ICU asset src path from build-resolved runtime pack
May 5, 2026
a7b3362
Ship libSystem.Native.Browser.extpost.js in browser-wasm runtime pack
May 5, 2026
905c755
Install libSystem.Native.Browser.extpost.js into sharedFramework
maraf May 6, 2026
9d4e5ce
Include static libs in browser-wasm CoreCLR runtime pack
maraf May 6, 2026
34f2aa2
Auto-enable WasmBuildNative for CoreCLR when NativeFileReference/Nati…
maraf May 6, 2026
c0b0e63
Exclude duplicate libs from browser-wasm CoreCLR runtime pack
maraf May 7, 2026
51b99d0
Treat CoreCLR as always workload
maraf May 8, 2026
0388696
Use icu_main.js for Wasm.Build.Tests DllImport variadic-function tests
maraf May 8, 2026
45afe55
Use minimal main.js for more Wasm.Build.Tests CoreCLR scenarios
maraf May 8, 2026
bef4e8b
Mark IcallWithOverloadedParametersAndEnum as mono-only
maraf May 8, 2026
37cdc06
Revert "Treat CoreCLR as always workload"
maraf May 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions eng/liveBuilds.targets
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@
$(HostSharedFrameworkDir)dotnet.native.js;
$(HostSharedFrameworkDir)dotnet.native.wasm;
"
Exclude="$(LibrariesSharedFrameworkDir)libminipal.a;
$(LibrariesSharedFrameworkDir)libSystem.IO.Compression.Native.a;
$(LibrariesSharedFrameworkDir)libz.a"
IsNative="true" />

<LibrariesRuntimeFiles Condition="'$(TargetOS)' == 'browser' and '$(RuntimeFlavor)' == 'Mono'"
Expand Down
9 changes: 9 additions & 0 deletions eng/testing/scenarios/BuildWasmAppsJobsListCoreCLR.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,13 @@ Wasm.Build.Tests.WasmRunOutOfAppBundleTests
Wasm.Build.Tests.WasmTemplateTests
Wasm.Build.Tests.MaxParallelDownloadsTests
Wasm.Build.Tests.LibraryInitializerTests
Wasm.Build.Tests.NativeBuildTests
Wasm.Build.Tests.DllImportTests
Wasm.Build.Tests.PInvokeTableGeneratorTests
Wasm.Build.Tests.NativeLibraryTests
Wasm.Build.Tests.IcuShardingTests
Wasm.Build.Tests.IcuShardingTests2
Wasm.Build.Tests.IcuTests
Wasm.Build.Tests.InvariantGlobalizationTests
Wasm.Build.Tests.MemoryTests
Comment on lines +19 to +23
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description says additional TestCategory("native") classes like IcuTests are "not in scope" and left for follow-up, but this change adds Icu*, InvariantGlobalizationTests, and MemoryTests to the CoreCLR job list. Either update the PR description to reflect the expanded scope or remove these additions to match the stated intent.

Copilot uses AI. Check for mistakes.
Wasm.Build.Tests.DownloadThenInitTests
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,14 @@
<PlatformManifestFileEntry Include="libgcinfo_unix_wasm.a" IsNative="true" />
<PlatformManifestFileEntry Include="libminipal.a" IsNative="true" />
<PlatformManifestFileEntry Include="libnativeresourcestring.a" IsNative="true" />
<PlatformManifestFileEntry Include="libBrowserHost.a" IsNative="true" />
<PlatformManifestFileEntry Include="libBrowserHost.js" IsNative="true" />
<PlatformManifestFileEntry Include="libBrowserHost.js.map" IsNative="true" />
<PlatformManifestFileEntry Include="libSystem.Native.Browser.Utils.js" IsNative="true" />
<PlatformManifestFileEntry Include="libSystem.Native.Browser.Utils.js.map" IsNative="true" />
<PlatformManifestFileEntry Include="libSystem.Native.Browser.js" IsNative="true" />
<PlatformManifestFileEntry Include="libSystem.Native.Browser.js.map" IsNative="true" />
<PlatformManifestFileEntry Include="libSystem.Native.Browser.extpost.js" IsNative="true" />
<PlatformManifestFileEntry Include="libSystem.Runtime.InteropServices.JavaScript.Native.js" IsNative="true" />
<PlatformManifestFileEntry Include="libSystem.Runtime.InteropServices.JavaScript.Native.js.map" IsNative="true" />
<!-- wasi specific -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<VSInsertionShortComponentName>NetCore.SharedFramework</VSInsertionShortComponentName>
<UseTemplatedPlatformManifest>true</UseTemplatedPlatformManifest>
<UseRidGraph>true</UseRidGraph>
<!-- WASM CoreCLR ships static libs in the runtime pack so apps can relink with emcc. -->
<IncludeStaticLibrariesInPack Condition="'$(TargetOS)' == 'browser' or '$(TargetOS)' == 'wasi'">true</IncludeStaticLibrariesInPack>
</PropertyGroup>

<ItemGroup>
Expand Down
20 changes: 20 additions & 0 deletions src/libraries/sendtohelix-browser.targets
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,15 @@
<HelixPreCommand Include="$(EnvVarCommand) BROWSER_BUILD_TARGETS_DIR=$HELIX_CORRELATION_PAYLOAD/build/wasm/" />
<HelixPreCommand Include="$(EnvVarCommand) WASM_APP_BUILDER_TASKS_ASSEMBLY_PATH=$HELIX_CORRELATION_PAYLOAD/build/WasmAppBuilder/WasmAppBuilder.dll" />
<HelixPreCommand Include="$(EnvVarCommand) EMSDK_PATH=$HELIX_CORRELATION_PAYLOAD/build/emsdk/" />
<HelixPreCommand Include="$(EnvVarCommand) MINIPAL_INCLUDE_DIR=$HELIX_CORRELATION_PAYLOAD/build/minipal/" />
</ItemGroup>

<ItemGroup Condition="'$(RuntimeFlavor)' == 'CoreCLR' and '$(Scenario)' == 'BuildWasmApps' and '$(WindowsShell)' == 'true'">
<HelixPreCommand Include="$(EnvVarCommand) REPOSITORY_ENGINEERING_DIR=%HELIX_CORRELATION_PAYLOAD%\build\eng\" />
<HelixPreCommand Include="$(EnvVarCommand) BROWSER_BUILD_TARGETS_DIR=%HELIX_CORRELATION_PAYLOAD%\build\wasm\" />
<HelixPreCommand Include="$(EnvVarCommand) WASM_APP_BUILDER_TASKS_ASSEMBLY_PATH=%HELIX_CORRELATION_PAYLOAD%\build\WasmAppBuilder\WasmAppBuilder.dll" />
<HelixPreCommand Include="$(EnvVarCommand) EMSDK_PATH=%HELIX_CORRELATION_PAYLOAD%\build\emsdk\" />
<HelixPreCommand Include="$(EnvVarCommand) MINIPAL_INCLUDE_DIR=%HELIX_CORRELATION_PAYLOAD%\build\minipal\" />
</ItemGroup>

<PropertyGroup Condition="'$(Scenario)' == 'BuildWasmApps'">
Expand Down Expand Up @@ -283,6 +285,24 @@
<HelixCorrelationPayload Include="$(_CoreCLRWbtEngPayloadDir)" Destination="build/eng" />
</ItemGroup>

<!-- CoreCLR WBT: ship src/native/minipal/utils.h into the payload so per-app native re-link
(BrowserWasmApp.CoreCLR.targets) can force-include it for ManagedToNativeGenerator output
(NOINLINE etc.). Stage into a directory first because HelixCorrelationPayload on individual
files causes the Helix client to try unzipping them as archives. -->
<PropertyGroup Condition="'$(NeedsEMSDK)' == 'true' and '$(RuntimeFlavor)' == 'CoreCLR'">
<_CoreCLRWbtMinipalPayloadDir>$(ArtifactsObjDir)helix-staging\coreclr-wbt-minipal\</_CoreCLRWbtMinipalPayloadDir>
</PropertyGroup>
<ItemGroup Condition="'$(NeedsEMSDK)' == 'true' and '$(RuntimeFlavor)' == 'CoreCLR'">
<_CoreCLRWbtMinipalFiles Include="$(RepoRoot)src\native\minipal\utils.h" />
</ItemGroup>
<Copy Condition="'$(NeedsEMSDK)' == 'true' and '$(RuntimeFlavor)' == 'CoreCLR'"
SourceFiles="@(_CoreCLRWbtMinipalFiles)"
DestinationFolder="$(_CoreCLRWbtMinipalPayloadDir)"
SkipUnchangedFiles="true" />
<ItemGroup Condition="'$(NeedsEMSDK)' == 'true' and '$(RuntimeFlavor)' == 'CoreCLR'">
<HelixCorrelationPayload Include="$(_CoreCLRWbtMinipalPayloadDir)" Destination="build/minipal" />
</ItemGroup>

<!-- copy node separately only if EMSDK is not being included -->
<ItemGroup Condition="'$(IncludeNodePayload)' == 'true'">
<HelixCorrelationPayload Include="$(EmSdkDirForHelixPayload)node" Destination="build/emsdk-node" />
Expand Down
128 changes: 72 additions & 56 deletions src/mono/browser/build/BrowserWasmApp.CoreCLR.targets
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,27 @@

<!-- ======================== Entry Points ======================== -->

<!-- Build entry point: runs after Build when WasmBuildNative is true -->
<!-- Auto-enable native relink based on project configuration. Mirrors a subset of
the Mono path's _SetWasmBuildNativeDefaults (WasmApp.Common.targets). -->
<Target Name="_CoreCLRSetWasmBuildNativeDefaults"
Condition="'$(IsBrowserWasmProject)' == 'true' and '$(IsCrossTargetingBuild)' != 'true'">
<PropertyGroup>
<!-- A project that references native files needs a relink to embed them.
NativeLibrary items are converted to NativeFileReference items later in the
flow (in _CoreCLRPrepareForNativeBuild) so we have to inspect both here. -->
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and (@(NativeFileReference->Count()) &gt; 0 or @(NativeLibrary->Count()) &gt; 0)">true</WasmBuildNative>
</PropertyGroup>
</Target>

<!-- Build entry point: runs after Build. The inner _CoreCLRWasmBuildAppCore is
gated on WasmBuildNative='true', so when no relink is needed this is a no-op. -->
<Target Name="WasmBuildApp"
AfterTargets="$(WasmBuildAppAfterThisTarget)"
Condition="'$(IsBrowserWasmProject)' == 'true' and
'$(WasmBuildNative)' == 'true' and
'$(WasmBuildingForNestedPublish)' != 'true' and
'$(WasmBuildOnlyAfterPublish)' != 'true' and
'$(IsCrossTargetingBuild)' != 'true'"
DependsOnTargets="_CoreCLRWasmBuildAppCore" />
DependsOnTargets="_CoreCLRSetWasmBuildNativeDefaults;_CoreCLRWasmBuildAppCore" />

<!-- Publish entry point: triggers nested publish for browser-wasm projects -->
<Target Name="WasmTriggerPublishApp"
Expand All @@ -108,7 +120,7 @@
<!-- Nested publish invocation -->
<Target Name="WasmNestedPublishApp"
Condition="'$(WasmBuildingForNestedPublish)' == 'true'"
DependsOnTargets="ResolveRuntimePackAssets;$(_WasmNestedPublishAppPreTarget);$(WasmNestedPublishAppDependsOn);_CoreCLRWasmBuildAppCore"
DependsOnTargets="ResolveRuntimePackAssets;$(_WasmNestedPublishAppPreTarget);$(WasmNestedPublishAppDependsOn);_CoreCLRSetWasmBuildNativeDefaults;_CoreCLRWasmBuildAppCore"
Returns="@(WasmAssembliesFinal);@(WasmNativeAsset)" />

<!-- ======================== Core Orchestrator ======================== -->
Expand Down Expand Up @@ -153,6 +165,7 @@
<_WasmIntermediateOutputPath Condition="'$(WasmBuildingForNestedPublish)' == 'true'">$([MSBuild]::NormalizeDirectory($(IntermediateOutputPath), 'wasm', 'for-publish'))</_WasmIntermediateOutputPath>

<_WasmCompileRsp>$(_WasmIntermediateOutputPath)emcc-compile.rsp</_WasmCompileRsp>
<_WasmCompileRspGenerated>$(_WasmIntermediateOutputPath)emcc-compile-generated.rsp</_WasmCompileRspGenerated>
<_WasmLinkRsp>$(_WasmIntermediateOutputPath)emcc-link.rsp</_WasmLinkRsp>
</PropertyGroup>

Expand Down Expand Up @@ -270,20 +283,38 @@
<_EmccCFlags Include="@(_EmccCommonFlags)" />
<_EmccCFlags Include="-DGEN_PINVOKE=1" />
<_EmccCFlags Include="$(EmccExtraCFlags)" />
</ItemGroup>

<!-- Include paths for ManagedToNativeGenerator output compilation -->
<_EmccCFlags Include="-I&quot;$(RepoRoot)src/coreclr/vm/wasm&quot;" Condition="Exists('$(RepoRoot)src/coreclr/vm/wasm/callhelpers.hpp')" />
<_EmccCFlags Include="-I&quot;$(RepoRoot)src/native&quot;" Condition="Exists('$(RepoRoot)src/native/minipal/entrypoints.h')" />
<_EmccCFlags Include="-include &quot;$(_WasmIntermediateOutputPath)coreclr_compat.h&quot;" />
<!-- Compile flags for ManagedToNativeGenerator output (pinvoke-table.cpp,
wasm_m2n_invoke.g.cpp). Force-include:
* coreclr_compat.h (ships next to this targets file) — provides type and
helper stubs to compile outside the full CoreCLR build context.
* minipal/utils.h — defines NOINLINE / FORCEINLINE / ARRAY_SIZE etc. used
directly by generator output (e.g. NOINLINE on portable-entry-point
call helpers in wasm_m2n_invoke.g.cpp).
We keep these off the user-source flags (_EmccCFlags) so user .c/.cpp
in NativeFileReference don't pick up the C++-style struct decls (which
would fail to compile in C without a 'struct' tag).
_MinipalIncludeDir is provided via MINIPAL_INCLUDE_DIR (HelixPreCommand
on Helix, RunScriptCommands locally) so the dir resolves outside the
in-repo source tree; falls back to the in-repo path for full repo builds. -->
<PropertyGroup>
<_MinipalIncludeDir Condition="'$(MINIPAL_INCLUDE_DIR)' != ''">$([MSBuild]::EnsureTrailingSlash($([System.IO.Path]::GetFullPath('$(MINIPAL_INCLUDE_DIR)'))))</_MinipalIncludeDir>
<_MinipalIncludeDir Condition="'$(_MinipalIncludeDir)' == ''">$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)..', '..', '..', 'native', 'minipal'))</_MinipalIncludeDir>
</PropertyGroup>
<ItemGroup>
<_EmccCFlagsGenerated Include="@(_EmccCFlags)" />
<_EmccCFlagsGenerated Include="-include &quot;$(MSBuildThisFileDirectory)coreclr_compat.h&quot;" />
<_EmccCFlagsGenerated Include="-include &quot;$(_MinipalIncludeDir)utils.h&quot;" />
</ItemGroup>

<!-- Source files: user NativeFileReference sources -->
<ItemGroup>
<_WasmSourceFileToCompile Remove="@(_WasmSourceFileToCompile)" />
<_WasmSourceFileToCompile Include="@(NativeFileReference)" Condition="'%(Extension)' == '.c' or '%(Extension)' == '.cpp'" />
<_WasmSourceFileToCompile ObjectFile="$(_WasmIntermediateOutputPath)%(FileName).o" />
<!-- Add compile RSP and compat header as dependencies for incremental build -->
<_WasmSourceFileToCompile Dependencies="$(_WasmCompileRsp);$(_WasmIntermediateOutputPath)coreclr_compat.h" />
<!-- Add compile RSP as dependency for incremental build -->
<_WasmSourceFileToCompile Dependencies="$(_WasmCompileRsp)" />
</ItemGroup>

<!-- Native .a files to link: any NativeFileReference that are archives -->
Expand Down Expand Up @@ -352,69 +383,40 @@
cause duplicate symbol errors when the archive object is pulled in for
other required symbols (e.g., SystemInteropJS_*). -->
<ItemGroup>
<_WasmSourceFileToCompile Include="$(_WasmPInvokeTablePath)" ObjectFile="$(_WasmIntermediateOutputPath)pinvoke-table.o"
Dependencies="$(_WasmCompileRsp);$(_WasmIntermediateOutputPath)coreclr_compat.h" />
<_WasmSourceFileToCompile Include="$(_WasmInterpToNativeTablePath)" ObjectFile="$(_WasmIntermediateOutputPath)wasm_m2n_invoke.o"
Dependencies="$(_WasmCompileRsp);$(_WasmIntermediateOutputPath)coreclr_compat.h" />
<_WasmSourceFileToCompileGenerated Remove="@(_WasmSourceFileToCompileGenerated)" />
<_WasmSourceFileToCompileGenerated Include="$(_WasmPInvokeTablePath)" ObjectFile="$(_WasmIntermediateOutputPath)pinvoke-table.o"
Dependencies="$(_WasmCompileRspGenerated);$(MSBuildThisFileDirectory)coreclr_compat.h;$(_MinipalIncludeDir)utils.h" />
<_WasmSourceFileToCompileGenerated Include="$(_WasmInterpToNativeTablePath)" ObjectFile="$(_WasmIntermediateOutputPath)wasm_m2n_invoke.o"
Dependencies="$(_WasmCompileRspGenerated);$(MSBuildThisFileDirectory)coreclr_compat.h;$(_MinipalIncludeDir)utils.h" />
</ItemGroup>
</Target>

<!-- ======================== Write Compile RSP ======================== -->

<Target Name="_CoreCLRWriteCompileRsp" Condition="@(_WasmSourceFileToCompile->Count()) > 0">
<!-- Generate a compatibility header with type/macro stubs for compiling
ManagedToNativeGenerator output outside the full CoreCLR build context -->
<PropertyGroup>
<_WasmCoreclrCompatHeader>$(_WasmIntermediateOutputPath)coreclr_compat.h</_WasmCoreclrCompatHeader>
</PropertyGroup>
<ItemGroup>
<_CompatHeaderLines Include="// Auto-generated CoreCLR compat header for app native build" />
<_CompatHeaderLines Include="#pragma once" />
<_CompatHeaderLines Include="#include &lt;stddef.h&gt;" />
<_CompatHeaderLines Include="#include &lt;stdint.h&gt;" />
<_CompatHeaderLines Include="#include &lt;stdlib.h&gt;" />
<_CompatHeaderLines Include="#include &lt;stdio.h&gt;" />
<_CompatHeaderLines Include="// CoreCLR type stubs" />
<_CompatHeaderLines Include="#ifndef _CORECLR_COMPAT_TYPES" />
<_CompatHeaderLines Include="#define _CORECLR_COMPAT_TYPES" />
<_CompatHeaderLines Include="typedef void MethodDesc%3B" />
<_CompatHeaderLines Include="typedef uintptr_t PCODE%3B" />
<_CompatHeaderLines Include="typedef uint32_t ULONG%3B" />
<_CompatHeaderLines Include="#define INTERP_STACK_SLOT_SIZE 8u" />
<_CompatHeaderLines Include="#endif" />
<_CompatHeaderLines Include="// CoreCLR logging stubs" />
<_CompatHeaderLines Include="#define LF_INTEROP 0" />
<_CompatHeaderLines Include="#define LL_INFO1000 0" />
<_CompatHeaderLines Include="#define LOG(x)" />
<_CompatHeaderLines Include="// CoreCLR assertion stubs" />
<_CompatHeaderLines Include="#define PORTABILITY_ASSERT(msg) do { fprintf(stderr, &quot;PORTABILITY_ASSERT: %25s&quot;, msg)%3B fprintf(stderr, &quot;\n&quot;)%3B abort()%3B } while(0)" />
</ItemGroup>

<WriteLinesToFile Lines="@(_CompatHeaderLines)" File="$(_WasmCoreclrCompatHeader)" Overwrite="true" WriteOnlyWhenDifferent="true" />
<ItemGroup>
<FileWrites Include="$(_WasmCoreclrCompatHeader)" />
</ItemGroup>

<Target Name="_CoreCLRWriteCompileRsp"
Condition="@(_WasmSourceFileToCompile->Count()) > 0 or @(_WasmSourceFileToCompileGenerated->Count()) > 0">
<ItemGroup>
<_WasmCFlags Include="@(_EmccCFlags)" />
<_WasmCFlagsGenerated Include="@(_EmccCFlagsGenerated)" />
</ItemGroup>
<WriteLinesToFile Lines="@(_WasmCFlags)" File="$(_WasmCompileRsp)" Overwrite="true" WriteOnlyWhenDifferent="true" />
<WriteLinesToFile Lines="@(_WasmCFlags)" File="$(_WasmCompileRsp)" Overwrite="true" WriteOnlyWhenDifferent="true" Condition="@(_WasmSourceFileToCompile->Count()) > 0" />
<WriteLinesToFile Lines="@(_WasmCFlagsGenerated)" File="$(_WasmCompileRspGenerated)" Overwrite="true" WriteOnlyWhenDifferent="true" Condition="@(_WasmSourceFileToCompileGenerated->Count()) > 0" />
<ItemGroup>
<FileWrites Include="$(_WasmCompileRsp)" />
<FileWrites Include="$(_WasmCompileRsp)" Condition="@(_WasmSourceFileToCompile->Count()) > 0" />
<FileWrites Include="$(_WasmCompileRspGenerated)" Condition="@(_WasmSourceFileToCompileGenerated->Count()) > 0" />
</ItemGroup>
</Target>

<!-- ======================== Compile Native Sources ======================== -->

<Target Name="_CoreCLRCompileNativeSources" Condition="@(_WasmSourceFileToCompile->Count()) > 0">
<ItemGroup>
<_WasmCompileArguments Remove="@(_WasmCompileArguments)" />
<_WasmCompileArguments Include="&quot;@$(_WasmCompileRsp)&quot;" Condition="'$(_WasmCompileRsp)' != ''" />
</ItemGroup>
<Target Name="_CoreCLRCompileNativeSources"
Condition="@(_WasmSourceFileToCompile->Count()) > 0 or @(_WasmSourceFileToCompileGenerated->Count()) > 0">

<!-- Compile user NativeFileReference sources (no force-included compat header). -->
<EmccCompile
Condition="@(_WasmSourceFileToCompile->Count()) > 0"
SourceFiles="@(_WasmSourceFileToCompile)"
Arguments="@(_WasmCompileArguments, ' ')"
Arguments="&quot;@$(_WasmCompileRsp)&quot;"
CompilerBinaryPath="$(WasmClang)"
EnvironmentVariables="@(EmscriptenEnvVars)"
DisableParallelCompile="$(DisableParallelEmccCompile)"
Expand All @@ -423,8 +425,22 @@
<Output TaskParameter="OutputFiles" ItemName="FileWrites" />
</EmccCompile>

<!-- Compile generated ManagedToNativeGenerator output (force-includes coreclr_compat.h). -->
<EmccCompile
Condition="@(_WasmSourceFileToCompileGenerated->Count()) > 0"
SourceFiles="@(_WasmSourceFileToCompileGenerated)"
Arguments="&quot;@$(_WasmCompileRspGenerated)&quot;"
CompilerBinaryPath="$(WasmClang)"
EnvironmentVariables="@(EmscriptenEnvVars)"
DisableParallelCompile="$(DisableParallelEmccCompile)"
MessageToIndicateCompiling="Compiling generated managed-to-native sources with emcc $(EmccCompileOptimizationFlag) ..."
OutputMessageImportance="$(_WasmCompileOutputMessageImportance)">
<Output TaskParameter="OutputFiles" ItemName="FileWrites" />
</EmccCompile>

<ItemGroup>
<_WasmNativeFileForLinking Include="%(_WasmSourceFileToCompile.ObjectFile)" />
<_WasmNativeFileForLinking Include="%(_WasmSourceFileToCompileGenerated.ObjectFile)" />
</ItemGroup>
</Target>

Expand Down
Loading
Loading