Skip to content

Commit

Permalink
Set some new Wasm properties so the Sdk can use Workloads when availa…
Browse files Browse the repository at this point in the history
…ble (#32036)

* update the workload manifest

* update the targets for the new condition

* Small fixes to the manifest

* Fix a condition and some formatting
  • Loading branch information
lewing authored Apr 27, 2021
1 parent c1a234d commit 3c91c4a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version": 1,
"workloads": {
"microsoft-net-sdk-blazorwebassembly-aot": {
"description": "Blazor WebAssembly AOT workload",
"description": "Browser WebAssembly runtime optimization tools",
"packs": [
"Microsoft.NET.Runtime.MonoAOTCompiler.Task",
"Microsoft.NET.Runtime.WebAssembly.Sdk",
Expand All @@ -26,10 +26,10 @@
"kind": "Sdk",
"version": "${MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion}",
"alias-to": {
"win-x86": "microsoft.netcore.app.runtime.aot.win-x86.cross.browser-wasm",
"win-x64": "microsoft.netcore.app.runtime.aot.win-x64.cross.browser-wasm",
"linux-x64": "microsoft.netcore.app.runtime.aot.linux-x64.cross.browser-wasm",
"osx-x64": "microsoft.netcore.app.runtime.aot.osx-x64.cross.browser-wasm"
"win-x86": "Microsoft.NETCore.App.Runtime.AOT.win-x86.Cross.browser-wasm",
"win-x64": "Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm",
"linux-x64": "Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.browser-wasm",
"osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.browser-wasm"
}
},
"Microsoft.NET.Runtime.Emscripten.Node" : {
Expand Down Expand Up @@ -62,4 +62,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
<Project>
<PropertyGroup Condition="'$(UsingMicrosoftNETSdkBlazorWebAssembly)'=='true' AND '$(RunAOTCompilation)' == 'true'">
<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm'">
<UsingBrowserRuntimeWorkload Condition="'$(RunAOTCompilation)' == 'true' or '$(UsingMicrosoftNETSdkBlazorWebAssembly)' != 'true'" >true</UsingBrowserRuntimeWorkload>
<UsingBrowserRuntimeWorkload Condition="'$(UsingBrowserRuntimeWorkload)' == ''" >$(WasmNativeWorkload)</UsingBrowserRuntimeWorkload>
</PropertyGroup>
<PropertyGroup Condition="'$(UsingMicrosoftNETSdkBlazorWebAssembly)' == 'true' and '$(UsingBrowserRuntimeWorkload)' == 'true'" >
<WasmGenerateAppBundle>false</WasmGenerateAppBundle>
<UsingBlazorAOTWorkloadManifest>true</UsingBlazorAOTWorkloadManifest>
</PropertyGroup>

<ImportGroup Condition="'$(UsingMicrosoftNETSdkBlazorWebAssembly)'=='true' AND '$(RunAOTCompilation)' == 'true'">
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoAOTCompiler.Task" />
<ImportGroup Condition="'$(UsingBrowserRuntimeWorkload)' == 'true'">
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoAOTCompiler.Task" Condition="'$(RunAOTCompilation)' == 'true'" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.WebAssembly.Sdk" />
<Import Project="Sdk.props" Sdk="Microsoft.Netcore.App.Runtime.Aot.Cross.browser-wasm" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Python" Condition="!$([MSBuild]::IsOsPlatform('Linux'))" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Python" Condition="!$([MSBuild]::IsOSPlatform('linux'))" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Node" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Sdk" />
</ImportGroup>
Expand Down

0 comments on commit 3c91c4a

Please sign in to comment.