Skip to content

Commit 7028044

Browse files
committed
- rebased
- removed perftrace runtime flavor - removed MonoWasmBuildVariant==perftrace - made IsThreadingSupported respect build flavor via IsBrowserThreadingSupported and --use-threads - removed most of event-pipe wasm sample - removed DISABLE_WASM_USER_THREADS and MonoWasmThreadsNoUser - fixed mono_wasm_execute_timer for WS without Main - added COOP into SimpleServer - fixed problem with SharedArrayBuffer in WS
1 parent 5fe7b06 commit 7028044

File tree

38 files changed

+40
-468
lines changed

38 files changed

+40
-468
lines changed

eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -137,29 +137,9 @@ jobs:
137137
# NOTE - Since threading is experimental, we don't want to block mainline work
138138
shouldContinueOnError: true
139139
scenarios:
140-
- normal
141140
- WasmTestOnBrowser
142-
- WasmTestOnNodeJS
143-
144-
# Library tests with internal threads only
145-
- template: /eng/pipelines/common/templates/wasm-library-tests.yml
146-
parameters:
147-
platforms:
148-
- browser_wasm
149-
#- browser_wasm_win
150-
nameSuffix: _Threading_PerfTracing
151-
extraBuildArgs: /p:MonoWasmBuildVariant=perftrace /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
152-
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
153-
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
154-
# Always run for runtime-wasm because tests are not run in runtime
155-
alwaysRun: ${{ parameters.isWasmOnlyBuild }}
141+
#- WasmTestOnNodeJS - this is not supported yet, https://github.com/dotnet/runtime/issues/85592
156142

157-
# NOTE - Since threading is experimental, we don't want to block mainline work
158-
shouldContinueOnError: true
159-
scenarios:
160-
- normal
161-
- WasmTestOnBrowser
162-
- WasmTestOnNodeJS
163143

164144
# EAT Library tests - only run on linux
165145
- template: /eng/pipelines/common/templates/wasm-library-aot-tests.yml
@@ -264,7 +244,7 @@ jobs:
264244
platforms:
265245
- Browser_wasm
266246
- Browser_wasm_win
267-
extraBuildArgs: /p:MonoWasmBuildVariant=multithread /p:WasmEnableThreads=true /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
247+
extraBuildArgs: /p:MonoWasmBuildVariant=multithread /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
268248
nameSuffix: DebuggerTests_MultiThreaded
269249
alwaysRun: ${{ parameters.isWasmOnlyBuild }}
270250
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}

eng/pipelines/mono/templates/workloads-build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,10 @@ jobs:
5555
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.android-*.nupkg
5656
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.browser-wasm*.nupkg
5757
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.multithread.browser-wasm*.nupkg
58-
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.perftrace.browser-wasm*.nupkg
5958
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.ios-*.nupkg
6059
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.iossimulator-*.nupkg
6160
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.maccatalyst-*.nupkg
6261
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.multithread.browser-wasm*.nupkg
63-
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.perftrace.browser-wasm*.nupkg
6462
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.tvos-*.nupkg
6563
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.tvossimulator-*.nupkg
6664
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm*.nupkg

eng/pipelines/runtime-official.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -180,22 +180,6 @@ extends:
180180
extraStepsParameters:
181181
name: MonoRuntimePacks
182182

183-
- template: /eng/pipelines/common/platform-matrix.yml
184-
parameters:
185-
jobTemplate: /eng/pipelines/common/global-build-job.yml
186-
buildConfig: release
187-
runtimeFlavor: mono
188-
platforms:
189-
- browser_wasm
190-
jobParameters:
191-
buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) /p:MonoWasmBuildVariant=perftrace /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
192-
nameSuffix: AllSubsets_Mono_perftrace
193-
isOfficialBuild: ${{ variables.isOfficialBuild }}
194-
runtimeVariant: perftrace
195-
extraStepsTemplate: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
196-
extraStepsParameters:
197-
name: MonoRuntimePacks
198-
199183
- template: /eng/pipelines/common/platform-matrix.yml
200184
parameters:
201185
jobTemplate: /eng/pipelines/common/global-build-job.yml

eng/pipelines/runtime.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -505,14 +505,6 @@ extends:
505505
scenarios:
506506
- WasmTestOnBrowser
507507

508-
- template: /eng/pipelines/common/templates/wasm-build-only.yml
509-
parameters:
510-
platforms:
511-
- browser_wasm
512-
nameSuffix: _Threading_PerfTracing
513-
extraBuildArgs: /p:MonoWasmBuildVariant=perftrace /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
514-
alwaysRun: ${{ variables.isRollingBuild }}
515-
516508
# WASI/WASM
517509

518510
- template: /eng/pipelines/common/templates/wasm-library-tests.yml

eng/testing/tests.browser.targets

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@
9696
<_AppArgs Condition="'$(WasmTestAppArgs)' != ''">$(_AppArgs) $(WasmTestAppArgs)</_AppArgs>
9797

9898
<WasmXHarnessMonoArgs Condition="'$(XunitShowProgress)' == 'true'">$(WasmXHarnessMonoArgs) --setenv=XHARNESS_LOG_TEST_START=1</WasmXHarnessMonoArgs>
99+
<!-- snapshots are not yet supported with threads -->
100+
<WasmXHarnessMonoArgs Condition="'$(MonoWasmBuildVariant)' == 'multithread'">$(WasmXHarnessMonoArgs) --no-memory-snapshot</WasmXHarnessMonoArgs>
101+
<!-- help unit test with PlatformDetection.IsThreadingSupported via IsBrowserThreadingSupported env variable -->
102+
<WasmXHarnessMonoArgs Condition="'$(MonoWasmBuildVariant)' == 'multithread'">$(WasmXHarnessMonoArgs) --use-threads</WasmXHarnessMonoArgs>
99103
</PropertyGroup>
100104

101105
<PropertyGroup Condition="'$(RunScriptCommand)' == ''">
@@ -104,7 +108,7 @@
104108

105109
<_XHarnessArgs Condition="'$(IsFunctionalTest)' == 'true'" >$(_XHarnessArgs) --expected-exit-code=$(ExpectedExitCode)</_XHarnessArgs>
106110
<_XHarnessArgs Condition="'$(WasmXHarnessArgs)' != ''" >$(_XHarnessArgs) $(WasmXHarnessArgs)</_XHarnessArgs>
107-
<_XHarnessArgs Condition="('$(WasmEnableThreads)' == 'true' or '$(WasmEnablePerfTracing)' == 'true') and '$(_XHarnessArs.Contains(&quot;--web-server-use-cop&quot;)' != 'true'">$(_XHarnessArgs) --web-server-use-cop</_XHarnessArgs>
111+
<_XHarnessArgs Condition="'$(MonoWasmBuildVariant)' == 'multithread' and '$(_XHarnessArs.Contains(&quot;--web-server-use-cop&quot;)' != 'true'">$(_XHarnessArgs) --web-server-use-cop</_XHarnessArgs>
108112
<_XHarnessArgs >$(_XHarnessArgs) -s dotnet.native.js.symbols</_XHarnessArgs>
109113
<_XHarnessArgs Condition="'$(_UseWasmSymbolicator)' == 'true'" >$(_XHarnessArgs) --symbol-patterns wasm-symbol-patterns.txt</_XHarnessArgs>
110114
<_XHarnessArgs Condition="'$(_UseWasmSymbolicator)' == 'true'" >$(_XHarnessArgs) --symbolicator WasmSymbolicator.dll,Microsoft.WebAssembly.Internal.SymbolicatorWrapperForXHarness</_XHarnessArgs>
@@ -288,7 +292,6 @@
288292
<Target Name="_GetRuntimePackNuGetsToBuild" Condition="'$(WasmSkipMissingRuntimePackBuild)' != 'true'" Returns="@(_NuGetsToBuild)">
289293
<PropertyGroup>
290294
<_DefaultBuildVariant Condition="'$(MonoWasmBuildVariant)' == 'multithread'">.multithread.</_DefaultBuildVariant>
291-
<_DefaultBuildVariant Condition="'$(MonoWasmBuildVariant)' == 'perftrace'">.perftrace.</_DefaultBuildVariant>
292295
<_DefaultBuildVariant Condition="'$(_DefaultBuildVariant)' == ''">.</_DefaultBuildVariant>
293296

294297
<_DefaultRuntimePackNuGetPath>$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Runtime.Mono$(_DefaultBuildVariant)$(RuntimeIdentifier).$(PackageVersionForWorkloadManifests).nupkg</_DefaultRuntimePackNuGetPath>
@@ -305,7 +308,6 @@
305308

306309
<ItemGroup>
307310
<_BuildVariants Include="multithread" Condition="'$(_DefaultBuildVariant)' != '.multithread.'" />
308-
<_BuildVariants Include="perftrace" Condition="'$(_DefaultBuildVariant)' != '.perftrace.'" />
309311

310312
<_NuGetsToBuild Include="$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Runtime.Mono.%(_BuildVariants.Identity).$(RuntimeIdentifier).$(PackageVersionForWorkloadManifests).nupkg"
311313
Project="$(InstallerProjectRoot)pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj"

src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public static bool IsPrivilegedProcess
116116
public static bool FileCreateCaseSensitive => IsCaseSensitiveOS;
117117
#endif
118118

119-
public static bool IsThreadingSupported => !IsBrowser && !IsWasi;
119+
public static bool IsThreadingSupported => !IsWasi && IsEnvironmentVariableTrue("IsBrowserThreadingSupported");
120120
public static bool IsBinaryFormatterSupported => IsNotMobile && !IsNativeAot;
121121

122122
public static bool IsStartingProcessesSupported => !IsiOS && !IstvOS;

src/libraries/System.Diagnostics.Tracing/src/System.Diagnostics.Tracing.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
55
</PropertyGroup>
66

7-
<PropertyGroup Condition="'$(MonoWasmBuildVariant)' == 'multithread' or
8-
'$(MonoWasmBuildVariant)' == 'perftrace'">
7+
<PropertyGroup Condition="'$(MonoWasmBuildVariant)' == 'multithread'">
98
<!-- when wasm threading is enabled the implementation in CoreLib won't have the UnsupportedOSAttribute for browser,
109
but this contract still does since we only expose the wasm threading through System.Diagnostics.Tracing.WebAssembly.PerfTracing
1110
so we need to baseline the ApiCompat errors related to that -->

src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<NoWarn>$(NoWarn);0809;0618;CS8614;CS3015</NoWarn>
1111
<StrongNameKeyId>SilverlightPlatform</StrongNameKeyId>
1212
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
13-
<FeatureWasmPerfTracing Condition="'$(MonoWasmBuildVariant)' == 'multithread' or '$(MonoWasmBuildVariant)' == 'perftrace'">true</FeatureWasmPerfTracing>
13+
<FeatureWasmPerfTracing Condition="'$(MonoWasmBuildVariant)' == 'multithread'">true</FeatureWasmPerfTracing>
1414
<FeatureWasmThreads Condition="'$(MonoWasmBuildVariant)' == 'multithread'">true</FeatureWasmThreads>
1515
<DefineConstants Condition="'$(FeatureWasmPerfTracing)' == 'true'">$(DefineConstants);FEATURE_WASM_PERFTRACING</DefineConstants>
1616
<DefineConstants Condition="'$(FeatureWasmThreads)' == 'true'">$(DefineConstants);FEATURE_WASM_THREADS</DefineConstants>

src/libraries/tests.proj

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@
5454
<ProjectExclusions Include="$(MonoProjectRoot)sample\wasm\browser-threads-minimal\Wasm.Browser.Threads.Minimal.Sample.csproj" />
5555
</ItemGroup>
5656

57-
<!-- Samples that require a perf-tracing wasm runtime -->
58-
<ItemGroup Condition="'$(TargetOS)' == 'browser' and '$(MonoWasmBuildVariant)' != 'perftrace'" >
59-
<ProjectExclusions Include="$(MonoProjectRoot)sample\wasm\browser-eventpipe\Wasm.Browser.EventPipe.Sample.csproj" />
60-
</ItemGroup>
61-
6257
<!-- wasm EAT/AOT -->
6358
<ItemGroup Condition="'$(TargetOS)' == 'browser' and '$(RunDisabledWasmTests)' != 'true' and '$(EnableAggressiveTrimming)' == 'true'">
6459
</ItemGroup>
@@ -375,13 +370,6 @@
375370
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.WebSockets.Client\tests\System.Net.WebSockets.Client.Tests.csproj" />
376371
</ItemGroup>
377372

378-
<ItemGroup Condition="'$(TargetOS)' == 'browser' and '$(MonoWasmBuildVariant)' == 'perftrace' and '$(RunDisabledWasmTests)' != 'true'">
379-
<!-- Issue: https://github.com/dotnet/runtime/issues/74411 -->
380-
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj" />
381-
<!-- Issue: https://github.com/dotnet/runtime/issues/74413 -->
382-
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.WebSockets.Client\tests\System.Net.WebSockets.Client.Tests.csproj" />
383-
</ItemGroup>
384-
385373
<!-- Aggressive Trimming related failures -->
386374
<ItemGroup Condition="('$(TargetOS)' != 'browser' and '$(RunAOTCompilation)' == 'true' and '$(MonoForceInterpreter)' != 'true') or ('$(TargetOS)' == 'browser' and '$(BuildAOTTestsOnHelix)' == 'true' and '$(RunDisabledWasmTests)' != 'true')">
387375
</ItemGroup>

src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121

122122
<FeatureMono>true</FeatureMono>
123123
<FeatureWasmThreads Condition="('$(TargetsBrowser)' == 'true' or '$(TargetsWasi)' == 'true') and '$(MonoWasmBuildVariant)' == 'multithread'">true</FeatureWasmThreads>
124-
<FeatureWasmPerfTracing Condition="('$(TargetsBrowser)' == 'true' or '$(TargetsWasi)' == 'true') and ('$(MonoWasmBuildVariant)' == 'multithread' or '$(MonoWasmBuildVariant)' == 'perftrace')">true</FeatureWasmPerfTracing>
124+
<FeatureWasmPerfTracing Condition="('$(TargetsBrowser)' == 'true' or '$(TargetsWasi)' == 'true') and ('$(MonoWasmBuildVariant)' == 'multithread')">true</FeatureWasmPerfTracing>
125125
<FeatureManagedEtwChannels>true</FeatureManagedEtwChannels>
126126
<FeatureManagedEtw>true</FeatureManagedEtw>
127127
<FeaturePortableTimer Condition="'$(TargetsBrowser)' != 'true' and '$(TargetsWasi)' != 'true'">true</FeaturePortableTimer>

src/mono/cmake/config.h.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,6 @@
299299
/* Disable Threads */
300300
#cmakedefine DISABLE_THREADS 1
301301

302-
/* Disable user thread creation on WebAssembly */
303-
#cmakedefine DISABLE_WASM_USER_THREADS 1
304-
305302
/* Disable MONO_LOG_DEST */
306303
#cmakedefine DISABLE_LOG_DEST
307304

src/mono/cmake/options.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ option (ENABLE_OVERRIDABLE_ALLOCATORS "Enable overridable allocator support")
5656
option (ENABLE_SIGALTSTACK "Enable support for using sigaltstack for SIGSEGV and stack overflow handling, this doesn't work on some platforms")
5757
option (USE_MALLOC_FOR_MEMPOOLS "Use malloc for each single mempool allocation, so tools like Valgrind can run better")
5858
option (STATIC_COMPONENTS "Compile mono runtime components as static (not dynamic) libraries")
59-
option (DISABLE_WASM_USER_THREADS "Disable creation of user managed threads on WebAssembly, only allow runtime internal managed and native threads")
6059
option (ENABLE_WEBCIL "Enable the WebCIL loader")
6160

6261
set (MONO_GC "sgen" CACHE STRING "Garbage collector implementation (sgen or boehm). Default: sgen")

src/mono/mono.proj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
- MonoVerboseBuild - enable verbose build
1010
- MonoThreadSuspend - coop,hybrid,preemptive - default thread suspend mode
1111
- MonoWasmThreads - build runtime with threading support for wasm
12-
- MonoWasmThreadsNoUser - build runtime with threading support for wasm, but with only internal utility threads (MonoWasmThreads must be defined too)
1312
-->
1413

1514
<PropertyGroup>
@@ -54,8 +53,7 @@
5453
<RepositoryEngineeringCommonDir>$([MSBuild]::NormalizeDirectory('$(RepositoryEngineeringDir)', 'common'))</RepositoryEngineeringCommonDir>
5554
<CrossToolchainFile>$([MSBuild]::NormalizePath('$(RepositoryEngineeringCommonDir)', 'cross', 'toolchain.cmake'))</CrossToolchainFile>
5655
<MonoWasmThreads Condition="'$(MonoWasmBuildVariant)' == 'singlethread'">false</MonoWasmThreads>
57-
<MonoWasmThreads Condition="'$(MonoWasmBuildVariant)' == 'multithread' or '$(MonoWasmBuildVariant)' == 'perftrace'">true</MonoWasmThreads>
58-
<MonoWasmThreadsNoUser Condition="'$(MonoWasmBuildVariant)' == 'perftrace'">true</MonoWasmThreadsNoUser>
56+
<MonoWasmThreads Condition="'$(MonoWasmBuildVariant)' == 'multithread'">true</MonoWasmThreads>
5957
<MonoEnableAssertMessages Condition="'$(MonoEnableAssertMessages)' == '' and '$(TargetsWasi)' == 'true'">true</MonoEnableAssertMessages>
6058
</PropertyGroup>
6159

@@ -417,7 +415,6 @@
417415
<_MonoMinimal Condition="'$(Configuration)' == 'Release'">,debugger_agent,log_dest</_MonoMinimal>
418416
<_MonoMinimal Condition="'$(Configuration)' == 'Release' and '$(MonoEnableAssertMessages)' != 'true'">$(_MonoMinimal),assert_messages</_MonoMinimal>
419417
<_MonoMinimal Condition="'$(MonoWasmThreads)' != 'true'">$(_MonoMinimal),threads</_MonoMinimal>
420-
<_MonoMinimal Condition="'$(MonoWasmThreadsNoUser)' == 'true'">$(_MonoMinimal),wasm_user_threads</_MonoMinimal>
421418
</PropertyGroup>
422419
<ItemGroup Condition="'$(TargetsBrowser)' == 'true' or '$(TargetsWasi)' == 'true'">
423420
<_MonoCMakeArgs Include="-DENABLE_MINIMAL=jit,sgen_major_marksweep_conc,sgen_split_nursery,sgen_gc_bridge,sgen_toggleref,sgen_debug_helpers,sgen_binary_protocol,logging,interpreter,qcalls$(_MonoMinimal)"/>

src/mono/mono/mini/mini-wasm.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,11 @@ mono_thread_state_init_from_handle (MonoThreadUnwindState *tctx, MonoThreadInfo
586586
EMSCRIPTEN_KEEPALIVE void
587587
mono_wasm_execute_timer (void)
588588
{
589-
g_assert (timer_handler);
589+
// callback could be null if timer was never used by the application, but only by prevent_timer_throttling_tick()
590+
if (timer_handler==NULL) {
591+
return;
592+
}
593+
590594
background_job_cb cb = timer_handler;
591595
cb ();
592596
}

src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/WorkloadManifest.json.in

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"packs": [
2020
"Microsoft.NET.Runtime.WebAssembly.Templates",
2121
"Microsoft.NETCore.App.Runtime.Mono.multithread.browser-wasm",
22-
"Microsoft.NETCore.App.Runtime.Mono.perftrace.browser-wasm"
2322
],
2423
"extends": [ "wasm-tools" ],
2524
"platforms": [ "win-x64", "win-arm64", "linux-x64", "osx-x64", "osx-arm64" ]
@@ -376,10 +375,6 @@
376375
"kind": "framework",
377376
"version": "${PackageVersion}"
378377
},
379-
"Microsoft.NETCore.App.Runtime.Mono.perftrace.browser-wasm" : {
380-
"kind": "framework",
381-
"version": "${PackageVersion}"
382-
},
383378
"Microsoft.NETCore.App.Runtime.Mono.wasi-wasm" : {
384379
"kind": "framework",
385380
"version": "${PackageVersion}"

src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/WorkloadManifest.targets.in

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@
149149
<LatestRuntimeFrameworkVersion Condition="'%(KnownRuntimePack.TargetFramework)' == '${NetCoreAppCurrent}' and '%(KnownRuntimePack.RuntimePackLabels)' == 'Mono'">$(_MonoWorkloadRuntimePackPackageVersion)</LatestRuntimeFrameworkVersion>
150150
<!-- Overrides for wasm threading support -->
151151
<RuntimePackNamePatterns Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(WasmEnableThreads)' == 'true'">Microsoft.NETCore.App.Runtime.Mono.multithread.**RID**</RuntimePackNamePatterns>
152-
<RuntimePackNamePatterns Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(WasmEnablePerfTracing)' == 'true'">Microsoft.NETCore.App.Runtime.Mono.perftrace.**RID**</RuntimePackNamePatterns>
153152
</KnownRuntimePack>
154153
<KnownWebAssemblySdkPack Update="@(KnownWebAssemblySdkPack)">
155154
<WebAssemblySdkPackVersion Condition="'%(KnownWebAssemblySdkPack.TargetFramework)' == '${NetCoreAppCurrent}'">$(_KnownWebAssemblySdkPackVersion)</WebAssemblySdkPackVersion>
@@ -176,11 +175,4 @@
176175
<Error Condition="'$(WasmBuildNative)' == 'true'"
177176
Text="WebAssembly workloads, required for native relinking, are only supported for projects targeting net6.0+ . Set %24(WasmBuildNative)=false to disable it." />
178177
</Target>
179-
180-
<Target Name="_ErrorDualWasmThreadProps"
181-
Condition="('$(TargetsCurrent)' == 'true' or '$(TargetsNet7)' == 'true') and '$(RuntimeIdentifier)' == 'browser-wasm' and
182-
'$(BrowserWorkloadDisabled)' != 'true' and '$(WasmEnableThreads)' == 'true' and '$(WasmEnablePerfTrace)' == 'true'"
183-
BeforeTargets="Build">
184-
<Error Text="WebAssembly workloads can only support one active threading mode at a time. Either set WasmEnableThreads or WasmEnablePerfTracing to true, but not both." />
185-
</Target>
186178
</Project>

src/mono/sample/wasm/Directory.Build.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<TargetOS>browser</TargetOS>
77
<TargetArchitecture>wasm</TargetArchitecture>
88
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
9+
<MonoWasmBuildVariant Condition="'$(WasmEnableThreads)' == 'true'">multithread</MonoWasmBuildVariant>
910
<!-- Suppress experimental trim warnings. This can be removed when we get a preview6 SDK. -->
1011
<NoWarn>$(NoWarn);IL2121</NoWarn>
1112
</PropertyGroup>
@@ -15,7 +16,7 @@
1516
<PropertyGroup>
1617
<OutputPath>bin</OutputPath>
1718
<WasmAppDir>$(MSBuildProjectDirectory)\bin\$(Configuration)\AppBundle\</WasmAppDir>
18-
<WasmXHarnessArgs Condition="'$(WasmEnableThreads)' == 'true' or '$(WasmEnablePerfTracing)' == 'true' or '$(MonoWasmBuildVariant)' == 'multithread' or '$(MonoWasmBuildVariant)' == 'perftrace'">$(WasmXHarnessArgs) --web-server-use-cop</WasmXHarnessArgs>
19+
<WasmXHarnessArgs Condition="'$(WasmEnableThreads)' == 'true'">$(WasmXHarnessArgs) --web-server-use-cop</WasmXHarnessArgs>
1920
</PropertyGroup>
2021
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
2122
<WasmNativeStrip>false</WasmNativeStrip>

0 commit comments

Comments
 (0)