|
57 | 57 | <OSGroup Condition="'$(OSGroup)' == ''">$(DefaultOSGroup)</OSGroup>
|
58 | 58 | <ConfigurationGroup Condition="'$(ConfigurationGroup)' == ''">Debug</ConfigurationGroup>
|
59 | 59 | <HostArch>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant)</HostArch>
|
60 |
| - <ArchGroup Condition="'$(ArchGroup)' == '' AND '$(HostArch)' == 'arm'">arm</ArchGroup> |
61 |
| - <ArchGroup Condition="'$(ArchGroup)' == '' AND '$(HostArch)' == 'arm64'">arm64</ArchGroup> |
| 60 | + <ArchGroup Condition="'$(ArchGroup)' == '' and '$(HostArch)' == 'arm'">arm</ArchGroup> |
| 61 | + <ArchGroup Condition="'$(ArchGroup)' == '' and '$(HostArch)' == 'arm64'">arm64</ArchGroup> |
| 62 | + <ArchGroup Condition="'$(ArchGroup)' == '' and '$(OSGroup)' == 'WebAssembly'">wasm</ArchGroup> |
62 | 63 | <ArchGroup Condition="'$(ArchGroup)' == ''">x64</ArchGroup>
|
63 | 64 |
|
| 65 | + <!-- RuntimeOS is calculated based on the build system OS, however if building for WebAssembly we need to let |
| 66 | + the build system to use webassembly as the RuntimeOS for produced package RIDs. --> |
| 67 | + <RuntimeOS Condition="'$(OSGroup)' == 'WebAssembly'">$(OSGroup.ToLowerInvariant())</RuntimeOS> |
| 68 | + |
64 | 69 | <!-- Initialize BuildConfiguration from the individual properties if it wasn't already explicitly set -->
|
65 | 70 | <BuildConfiguration Condition="'$(BuildConfiguration)' == ''">$(TargetGroup)-$(OSGroup)-$(ConfigurationGroup)-$(ArchGroup)</BuildConfiguration>
|
66 | 71 |
|
67 | 72 | <!-- if PKGPROJ doesn't set BuildConfigurations, make sure it only builds for TargetGroup=package or BuildAllConfigurations -->
|
68 |
| - <BuildConfigurations Condition="'$(MSBuildProjectExtension)' == '.pkgproj' AND '$(BuildConfigurations)' == ''">package</BuildConfigurations> |
| 73 | + <BuildConfigurations Condition="'$(MSBuildProjectExtension)' == '.pkgproj' and '$(BuildConfigurations)' == ''">package</BuildConfigurations> |
69 | 74 | </PropertyGroup>
|
70 | 75 |
|
71 | 76 | <!-- Informs build tools to apply .NET Framework metadata if not a test project -->
|
|
130 | 135 | <ToolRuntimeRID Condition="'$(BuildingInsideVisualStudio)' == 'true'">$(_runtimeOS)-x64</ToolRuntimeRID>
|
131 | 136 | <ToolRuntimeRID Condition="'$(ToolRuntimeID)' == ''">$(_runtimeOS)-$(HostArch)</ToolRuntimeRID>
|
132 | 137 | <!-- We build linux-musl-arm on a ubuntu container, so we can't use the toolset build for alpine runtime. We need to use portable linux RID for our toolset in order to be able to use it. -->
|
133 |
| - <ToolRuntimeRID Condition="'$(_runtimeOS)' == 'linux-musl' AND $(ArchGroup.StartsWith('arm')) AND !$(HostArch.StartsWith('arm'))">linux-x64</ToolRuntimeRID> |
| 138 | + <ToolRuntimeRID Condition="'$(_runtimeOS)' == 'linux-musl' and $(ArchGroup.StartsWith('arm')) and !$(HostArch.StartsWith('arm'))">linux-x64</ToolRuntimeRID> |
134 | 139 |
|
135 |
| - <!-- There are no WebAssembly tools, so treat them as Windows --> |
136 |
| - <ToolRuntimeRID Condition="'$(RuntimeOS)' == 'WebAssembly'">win-x64</ToolRuntimeRID> |
| 140 | + <!-- There are no WebAssembly tools, so use the default ones --> |
| 141 | + <_buildingInOSX>$([MSBuild]::IsOSPlatform('OSX'))</_buildingInOSX> |
| 142 | + <ToolRuntimeRID Condition="'$(RuntimeOS)' == 'webassembly' and '$(OS)' == 'Windows_NT'">win-x64</ToolRuntimeRID> |
| 143 | + <ToolRuntimeRID Condition="'$(RuntimeOS)' == 'webassembly' and '$(OS)' != 'Windows_NT' and $(_buildingInOSX)">osx-x64</ToolRuntimeRID> |
| 144 | + <ToolRuntimeRID Condition="'$(RuntimeOS)' == 'webassembly' and '$(OS)' != 'Windows_NT' and !$(_buildingInOSX)">linux-x64</ToolRuntimeRID> |
137 | 145 |
|
138 | 146 | <!-- support cross-targeting by choosing a RID to restore when running on a different machine that what we're build for -->
|
139 |
| - <_portableOS Condition="'$(OSGroup)' == 'Unix' AND '$(_runtimeOSFamily)' != 'osx' AND '$(_runtimeOSFamily)' != 'FreeBSD' AND '$(_runtimeOS)' != 'linux-musl'">linux</_portableOS> |
| 147 | + <_portableOS Condition="'$(OSGroup)' == 'Unix' and '$(_runtimeOSFamily)' != 'osx' and '$(_runtimeOSFamily)' != 'FreeBSD' AND '$(_runtimeOS)' != 'linux-musl'">linux</_portableOS> |
140 | 148 |
|
141 | 149 | <_packageRID />
|
142 | 150 | <_packageRID Condition="'$(PortableBuild)' == 'true'">$(_portableOS)-$(ArchGroup)</_packageRID>
|
|
0 commit comments