From a28164cfa510bfee88992f4e2eaa6ea143184501 Mon Sep 17 00:00:00 2001 From: Aleksey Kliger Date: Thu, 8 Sep 2022 15:10:34 -0400 Subject: [PATCH] [wasm-mt] Additional build fixes Foward port changes from `release/7.0` https://github.com/dotnet/runtime/pull/75171 that were not included in `main` https://github.com/dotnet/runtime/pull/75162 - when building the InteropServices.JavaScript library, enable threading if MonoWasmBuildVariant is set appropriately. One consequence is that the runtime will (correctly) install the browser synchronization context on the main thread. - for workload build testing, unset MonoWasmBuildVariant when creating the non-threaded runtime --- eng/testing/workloads-testing.targets | 2 +- .../src/System.Runtime.InteropServices.JavaScript.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/testing/workloads-testing.targets b/eng/testing/workloads-testing.targets index 5da047758f8185..8f776c821cf8a8 100644 --- a/eng/testing/workloads-testing.targets +++ b/eng/testing/workloads-testing.targets @@ -183,7 +183,7 @@ <_NuGetsToBuild Include="$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Runtime.Mono.browser-wasm.$(_PackageVersion).nupkg" Project="$(InstallerProjectRoot)pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj" - Properties="@(_DefaultPropsForNuGetBuild, ';')" + Properties="@(_DefaultPropsForNuGetBuild, ';');MonoWasmBuildVariant=" Dependencies="$(_DefaultRuntimePackNuGetPath)" Descriptor="single threaded runtime pack" Condition="'$(_DefaultBuildVariant)' != '.'" /> diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System.Runtime.InteropServices.JavaScript.csproj b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System.Runtime.InteropServices.JavaScript.csproj index e9c286f47aa84c..82b95560ab2a94 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System.Runtime.InteropServices.JavaScript.csproj +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System.Runtime.InteropServices.JavaScript.csproj @@ -6,7 +6,7 @@ - true + true