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

Add support for building WASM variants alongside single-threaded to the build system #71054

Merged
merged 12 commits into from
Jul 13, 2022

Conversation

directhex
Copy link
Contributor

@directhex directhex commented Jun 21, 2022

This is a first cut at allowing single thread, multi thread, and perftrace wasm builds to all happen as a single "thing"

  • Add mono.wasmvariants subset to build variants
  • Add variants to WASM package, or their own packages, TBD
  • Add YAML to actually build this in CI

@directhex
Copy link
Contributor Author

Right now, this is dumping the runtime variants in artifacts/bin/mono/Browser.Wasm.Release/wasm/{multithread,perftrace} and the native parts in artifacts/bin/native/net7.0-Browser-Release-wasm/wasm/{multithread,perftrace}

@directhex
Copy link
Contributor Author

directhex commented Jun 21, 2022

One issue(?) right now is you can't build the mono.wasmvariants subset without first building mono and libs

Without libs:

/home/directhex/Projects/runtime/eng/liveBuilds.targets(125,5): error : The 'libs' subset must be built before building this project. Missing artifacts: /home/directhex/Projects/runtime/artifacts/bin/microsoft.netcore.app.ref/ref/net7.0/. Configuration: 'Release'. To use a different configuration, specify the 'LibrariesConfiguration' property. [/home/directhex/Projects/runtime/src/mono/wasm/wasm.proj]

Without mono:

/root/.nuget/packages/microsoft.dotnet.sharedframework.sdk/7.0.0-beta.22316.2/targets/sharedfx.targets(189,5): error MSB4018: The "GenerateSharedFrameworkDepsFile" task failed unexpectedly. [/home/directhex/Projects/runtime/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj]
/root/.nuget/packages/microsoft.dotnet.sharedframework.sdk/7.0.0-beta.22316.2/targets/sharedfx.targets(189,5): error MSB4018: System.IO.FileNotFoundException: /home/directhex/Projects/runtime/artifacts/bin/native/net7.0-Browser-Release-wasm/dotnet.js [/home/directhex/Projects/runtime/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj]
/root/.nuget/packages/microsoft.dotnet.sharedframework.sdk/7.0.0-beta.22316.2/targets/sharedfx.targets(189,5): error MSB4018:    at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName) [/home/directhex/Projects/runtime/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj]
/root/.nuget/packages/microsoft.dotnet.sharedframework.sdk/7.0.0-beta.22316.2/targets/sharedfx.targets(189,5): error MSB4018:    at Microsoft.DotNet.SharedFramework.Sdk.FileUtilities.GetFileVersion(String sourcePath) in /_/src/Microsoft.DotNet.SharedFramework.Sdk/src/FileUtilities.cs:line 22 [/home/directhex/Projects/runtime/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj]
/root/.nuget/packages/microsoft.dotnet.sharedframework.sdk/7.0.0-beta.22316.2/targets/sharedfx.targets(189,5): error MSB4018:    at Microsoft.DotNet.SharedFramework.Sdk.GenerateSharedFrameworkDepsFile.Execute() in /_/src/Microsoft.DotNet.SharedFramework.Sdk/src/GenerateSharedFrameworkDepsFile.cs:line 63 [/home/directhex/Projects/runtime/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj]
/root/.nuget/packages/microsoft.dotnet.sharedframework.sdk/7.0.0-beta.22316.2/targets/sharedfx.targets(189,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/home/directhex/Projects/runtime/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj]
/root/.nuget/packages/microsoft.dotnet.sharedframework.sdk/7.0.0-beta.22316.2/targets/sharedfx.targets(189,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/home/directhex/Projects/runtime/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj]

@directhex directhex requested review from lewing and radical June 21, 2022 18:14
@directhex
Copy link
Contributor Author

@steveisok I've eventually got this running with some very bad yaml. I tried parameterizing on runtimeVariant, but couldn't find a way to use the parameter in nameSuffix (which must be unique) without error. Moving from the old properties to the common MonoWasmBuildVariant property should make future parameterization easier.

@steveisok
Copy link
Member

@steveisok I've eventually got this running with some very bad yaml. I tried parameterizing on runtimeVariant, but couldn't find a way to use the parameter in nameSuffix (which must be unique) without error. Moving from the old properties to the common MonoWasmBuildVariant property should make future parameterization easier.

I'm ok with a follow up to make things better.

@directhex directhex marked this pull request as ready for review July 12, 2022 13:45
@directhex directhex requested a review from marek-safar as a code owner July 12, 2022 13:45
@steveisok steveisok merged commit 0edb774 into dotnet:main Jul 13, 2022
@steveisok
Copy link
Member

/backport to release/7.0-preview7

@github-actions
Copy link
Contributor

Started backporting to release/7.0-preview7: https://github.com/dotnet/runtime/actions/runs/2666329112

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants