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] Drop extra files from ReferenceCopyLocalPaths #83670

Closed
wants to merge 8 commits into from
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,14 @@
BeforeTargets="Build">
<Error Text="WebAssembly workloads can only support one active threading mode at a time. Either set WasmEnableThreads or WasmEnablePerfTracing to true, but not both." />
</Target>

<Target Name="_DropIntermediaryFilesFromOuput" AfterTargets="ResolveRuntimePackAssets">
<PropertyGroup>
<_WasmExtensionsToDrop>.a;.c;.h;.rsp;.json;.symbols;.ts;</_WasmExtensionsToDrop>
</PropertyGroup>
<ItemGroup>
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)"
Condition="$(_WasmExtensionsToDrop.Contains('%(ReferenceCopyLocalPaths.Extension);')) or ('%(Extension)' == '.js' and $([MSBuild]::ValueOrDefault('%(FullPath)', '').Contains('src')))" />
</ItemGroup>
</Target>
</Project>
10 changes: 10 additions & 0 deletions src/mono/wasm/build/WasmApp.InTree.targets
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,14 @@
<ZipDirectory SourceDirectory="$(WasmAppDir)" DestinationFile="$(ZippedApp)" />
<Copy SourceFiles="$(ZippedApp)" DestinationFolder="$(HelixArchiveRunOnlyAppsDir)" />
</Target>

<Target Name="_DropIntermediaryFilesFromOuput" AfterTargets="ResolveRuntimePackAssets">
<PropertyGroup>
<_WasmExtensionsToDrop>.a;.c;.h;.rsp;.json;.symbols;.ts;</_WasmExtensionsToDrop>
</PropertyGroup>
<ItemGroup>
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)"
Condition="$(_WasmExtensionsToDrop.Contains('%(ReferenceCopyLocalPaths.Extension);')) or ('%(Extension)' == '.js' and $([MSBuild]::ValueOrDefault('%(FullPath)', '').Contains('src')))" />
</ItemGroup>
</Target>
</Project>