|
17 | 17 | <ShouldUnsetParentConfigurationAndPlatform>false</ShouldUnsetParentConfigurationAndPlatform>
|
18 | 18 | </PropertyGroup>
|
19 | 19 |
|
20 |
| - <PropertyGroup Label="CalculateTargetOS"> |
21 |
| - <_hostOS>linux</_hostOS> |
22 |
| - <_hostOS Condition="$([MSBuild]::IsOSPlatform('OSX'))">osx</_hostOS> |
23 |
| - <_hostOS Condition="$([MSBuild]::IsOSPlatform('FREEBSD'))">freebsd</_hostOS> |
24 |
| - <_hostOS Condition="$([MSBuild]::IsOSPlatform('NETBSD'))">netbsd</_hostOS> |
25 |
| - <_hostOS Condition="$([MSBuild]::IsOSPlatform('ILLUMOS'))">illumos</_hostOS> |
26 |
| - <_hostOS Condition="$([MSBuild]::IsOSPlatform('SOLARIS'))">solaris</_hostOS> |
27 |
| - <_hostOS Condition="$([MSBuild]::IsOSPlatform('HAIKU'))">haiku</_hostOS> |
28 |
| - <_hostOS Condition="$([MSBuild]::IsOSPlatform('WINDOWS'))">windows</_hostOS> |
29 |
| - <HostOS>$(_hostOS)</HostOS> |
30 |
| - <TargetOS Condition="'$(TargetOS)' == '' and '$(RuntimeIdentifier)' == 'browser-wasm'">browser</TargetOS> |
31 |
| - <TargetOS Condition="'$(TargetOS)' == ''">$(_hostOS)</TargetOS> |
32 |
| - <TargetsMobile Condition="'$(TargetOS)' == 'ios' or '$(TargetOS)' == 'iossimulator' or '$(TargetOS)' == 'maccatalyst' or '$(TargetOS)' == 'tvos' or '$(TargetOS)' == 'tvossimulator' or '$(TargetOS)' == 'android' or '$(TargetOS)' == 'browser' or '$(TargetOS)' == 'wasi'">true</TargetsMobile> |
33 |
| - <TargetsAppleMobile Condition="'$(TargetOS)' == 'ios' or '$(TargetOS)' == 'iossimulator' or '$(TargetOS)' == 'maccatalyst' or '$(TargetOS)' == 'tvos' or '$(TargetOS)' == 'tvossimulator'">true</TargetsAppleMobile> |
34 |
| - </PropertyGroup> |
35 |
| - |
36 |
| - <!-- Platform property is required by RepoLayout.props in Arcade SDK. --> |
37 |
| - <PropertyGroup Label="CalculateArch"> |
38 |
| - <_hostArch>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant)</_hostArch> |
39 |
| - <BuildArchitecture Condition="'$(BuildArchitecture)' == ''">$(_hostArch)</BuildArchitecture> |
40 |
| - <TargetArchitecture Condition="'$(TargetArchitecture)' == '' and ('$(TargetOS)' == 'browser' or '$(RuntimeIdentifier)' == 'browser-wasm')">wasm</TargetArchitecture> |
41 |
| - <TargetArchitecture Condition="'$(TargetArchitecture)' == '' and ('$(TargetOS)' == 'wasi' or '$(RuntimeIdentifier)' == 'wasi-wasm')">wasm</TargetArchitecture> |
42 |
| - <TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 'arm'">arm</TargetArchitecture> |
43 |
| - <TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 'armv6'">armv6</TargetArchitecture> |
44 |
| - <TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 'armel'">armel</TargetArchitecture> |
45 |
| - <TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 'arm64'">arm64</TargetArchitecture> |
46 |
| - <TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 'loongarch64'">loongarch64</TargetArchitecture> |
47 |
| - <TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 's390x'">s390x</TargetArchitecture> |
48 |
| - <TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 'ppc64le'">ppc64le</TargetArchitecture> |
49 |
| - <TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(TargetsMobile)' == 'true'">x64</TargetArchitecture> |
50 |
| - <TargetArchitecture Condition="'$(TargetArchitecture)' == ''">x64</TargetArchitecture> |
51 |
| - <Platform Condition="'$(Platform)' == '' and '$(InferPlatformFromTargetArchitecture)' == 'true'">$(TargetArchitecture)</Platform> |
52 |
| - </PropertyGroup> |
| 20 | + <!-- We don't have RepoRoot or RepositoryEngineeringDir available at this point --> |
| 21 | + <Import Project="$(MSBuildThisFileDirectory)/eng/OSArch.props" /> |
53 | 22 |
|
54 | 23 | <PropertyGroup Label="SetOSTargetMinVersions">
|
55 | 24 | <!--
|
|
197 | 166 | <MonoCrossAOTTargetOS Condition="'$(TargetOS)' == 'osx'">$(MonoCrossAOTTargetOS)+tvos+ios+maccatalyst</MonoCrossAOTTargetOS>
|
198 | 167 | </PropertyGroup>
|
199 | 168 |
|
200 |
| - <PropertyGroup Label="CalculatePortableBuild"> |
201 |
| - <PortableBuild Condition="'$(PortableBuild)' == '' and '$(DotNetBuildSourceOnly)' == 'true'">false</PortableBuild> |
202 |
| - <PortableBuild Condition="'$(PortableBuild)' == ''">true</PortableBuild> |
203 |
| - </PropertyGroup> |
204 |
| - |
205 |
| - <!-- _portableOS is the portable rid-OS corresponding to the target platform. --> |
206 |
| - <PropertyGroup Label="CalculatePortableOS"> |
207 |
| - <!-- To determine _portableOS we use TargetOS. |
208 |
| - TargetOS is not a rid-OS. For example: for Windows it is 'windows' instead of 'win'. |
209 |
| - And, for flavors of Linux, like 'linux-musl' and 'linux-bionic', TargetOS is 'linux'. --> |
210 |
| - |
211 |
| - <_portableOS>$(TargetOS.ToLowerInvariant())</_portableOS> |
212 |
| - <_portableOS Condition="'$(_portableOS)' == 'windows'">win</_portableOS> |
213 |
| - |
214 |
| - <!-- TargetOS=AnyOS is a sentinel value used by tests, ignore it. --> |
215 |
| - <_portableOS Condition="'$(_portableOS)' == 'anyos'">$(__PortableTargetOS)</_portableOS> |
216 |
| - |
217 |
| - <!-- Detect linux flavors using __PortableTargetOS from the native script. --> |
218 |
| - <_portableOS Condition="'$(_portableOS)' == 'linux' and '$(__PortableTargetOS)' == 'linux-musl'">linux-musl</_portableOS> |
219 |
| - <_portableOS Condition="'$(_portableOS)' == 'linux' and '$(__PortableTargetOS)' == 'linux-bionic'">linux-bionic</_portableOS> |
220 |
| - |
221 |
| - <!-- On Windows, we can build for Windows and Mobile. |
222 |
| - For other TargetOSes, create a "win" build, built from TargetOS sources and "win" pre-built packages. --> |
223 |
| - <_portableOS Condition="'$(HostOS)' == 'win' and '$(TargetsMobile)' != 'true'">win</_portableOS> |
224 |
| - </PropertyGroup> |
225 |
| - |
226 |
| - <!-- PackageRID is used for packages needed for the target. --> |
227 |
| - <PropertyGroup Label="CalculatePackageRID"> |
228 |
| - <_packageOS>$(_portableOS)</_packageOS> |
229 |
| - |
230 |
| - <_packageOS Condition="'$(CrossBuild)' == 'true' and '$(_portableOS)' != 'linux-musl' and '$(_portableOS)' != 'linux-bionic' and '$(_portableOS)' != 'android'">$(_hostOS)</_packageOS> |
231 |
| - |
232 |
| - <!-- source-build sets PackageOS to build with non-portable rid packages that were source-built previously. --> |
233 |
| - <PackageRID Condition="'$(PackageOS)' != ''">$(PackageOS)-$(TargetArchitecture)</PackageRID> |
234 |
| - <PackageRID Condition="'$(PackageRID)' == ''">$(_packageOS)-$(TargetArchitecture)</PackageRID> |
235 |
| - </PropertyGroup> |
236 |
| - |
237 |
| - <!-- ToolsRID is used for packages needed on the build host. --> |
238 |
| - <PropertyGroup Label="CalculateToolsRID"> |
239 |
| - <!-- _portableHostOS is the portable rid-OS corresponding to the build host platform. |
240 |
| -
|
241 |
| - To determine _portableHostOS we use _hostOS, similar to how _portableOS is calculated from TargetOS. |
242 |
| -
|
243 |
| - When we're not cross-building we can detect linux flavors by looking at _portableOS |
244 |
| - because the target platform and the build host platform are the same. |
245 |
| - For cross-builds, we're currently unable to detect the flavors. --> |
246 |
| - <_portableHostOS>$(_hostOS)</_portableHostOS> |
247 |
| - <_portableHostOS Condition="'$(_portableHostOS)' == 'windows'">win</_portableHostOS> |
248 |
| - <_portableHostOS Condition="'$(CrossBuild)' != 'true' and '$(_portableOS)' == 'linux-musl'">linux-musl</_portableHostOS> |
249 |
| - |
250 |
| - <!-- source-build sets ToolsOS to build with non-portable rid packages that were source-built previously. --> |
251 |
| - <ToolsRID Condition="'$(ToolsOS)' != ''">$(ToolsOS)-$(_hostArch)</ToolsRID> |
252 |
| - <ToolsRID Condition="'$(ToolsRID)' == ''">$(_portableHostOS)-$(_hostArch)</ToolsRID> |
253 |
| - |
254 |
| - <!-- Microsoft.NET.Sdk.IL SDK defaults to the portable host rid. Match it to ToolsRID (for source-build). --> |
255 |
| - <MicrosoftNetCoreIlasmPackageRuntimeId>$(ToolsRID)</MicrosoftNetCoreIlasmPackageRuntimeId> |
256 |
| - </PropertyGroup> |
257 |
| - |
258 |
| - <!-- OutputRID is used to name the target platform. |
259 |
| - For portable builds, OutputRID matches _portableOS. |
260 |
| - For non-portable builds, it uses __DistroRid (from the native build script), or falls back to RuntimeInformation.RuntimeIdentifier. |
261 |
| - Source-build sets OutputRID directly. --> |
262 |
| - <PropertyGroup Label="CalculateOutputRID"> |
263 |
| - <_hostRid Condition="'$(MSBuildRuntimeType)' == 'core'">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</_hostRid> |
264 |
| - <_hostRid Condition="'$(MSBuildRuntimeType)' != 'core'">win-$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant)</_hostRid> |
265 |
| - |
266 |
| - <_parseDistroRid>$(__DistroRid)</_parseDistroRid> |
267 |
| - <_parseDistroRid Condition="'$(_parseDistroRid)' == ''">$(_hostRid)</_parseDistroRid> |
268 |
| - <_distroRidIndex>$(_parseDistroRid.LastIndexOf('-'))</_distroRidIndex> |
269 |
| - |
270 |
| - <_outputOS>$(_parseDistroRid.SubString(0, $(_distroRidIndex)))</_outputOS> |
271 |
| - <_outputOS Condition="'$(PortableBuild)' == 'true'">$(_portableOS)</_outputOS> |
272 |
| - |
273 |
| - <OutputRID Condition="'$(OutputRID)' == ''">$(_outputOS)-$(TargetArchitecture)</OutputRID> |
274 |
| - </PropertyGroup> |
275 |
| - |
276 |
| - <PropertyGroup Label="CalculateTargetOSName"> |
277 |
| - <TargetsFreeBSD Condition="'$(TargetOS)' == 'freebsd'">true</TargetsFreeBSD> |
278 |
| - <Targetsillumos Condition="'$(TargetOS)' == 'illumos'">true</Targetsillumos> |
279 |
| - <TargetsSolaris Condition="'$(TargetOS)' == 'solaris'">true</TargetsSolaris> |
280 |
| - <TargetsHaiku Condition="'$(TargetOS)' == 'haiku'">true</TargetsHaiku> |
281 |
| - <TargetsLinux Condition="'$(TargetOS)' == 'linux' or '$(TargetOS)' == 'android'">true</TargetsLinux> |
282 |
| - <TargetsLinuxBionic Condition="'$(_portableOS)' == 'linux-bionic'">true</TargetsLinuxBionic> |
283 |
| - <TargetsLinuxMusl Condition="'$(_portableOS)' == 'linux-musl'">true</TargetsLinuxMusl> |
284 |
| - <TargetsLinuxGlibc Condition="'$(TargetsLinux)' == 'true' and '$(TargetsLinuxMusl)' != 'true' and '$(TargetsLinuxBionic)' != 'true'">true</TargetsLinuxGlibc> |
285 |
| - <TargetsNetBSD Condition="'$(TargetOS)' == 'netbsd'">true</TargetsNetBSD> |
286 |
| - <TargetsOSX Condition="'$(TargetOS)' == 'osx'">true</TargetsOSX> |
287 |
| - <TargetsMacCatalyst Condition="'$(TargetOS)' == 'maccatalyst'">true</TargetsMacCatalyst> |
288 |
| - <TargetsiOS Condition="'$(TargetOS)' == 'ios' or '$(TargetOS)' == 'iossimulator'">true</TargetsiOS> |
289 |
| - <TargetstvOS Condition="'$(TargetOS)' == 'tvos' or '$(TargetOS)' == 'tvossimulator'">true</TargetstvOS> |
290 |
| - <TargetsiOSSimulator Condition="'$(TargetOS)' == 'iossimulator'">true</TargetsiOSSimulator> |
291 |
| - <TargetstvOSSimulator Condition="'$(TargetOS)' == 'tvossimulator'">true</TargetstvOSSimulator> |
292 |
| - <TargetsAndroid Condition="'$(TargetOS)' == 'android'">true</TargetsAndroid> |
293 |
| - <TargetsBrowser Condition="'$(TargetOS)' == 'browser'">true</TargetsBrowser> |
294 |
| - <TargetsWasi Condition="'$(TargetOS)' == 'wasi'">true</TargetsWasi> |
295 |
| - <TargetsWindows Condition="'$(TargetOS)' == 'windows'">true</TargetsWindows> |
296 |
| - <TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(Targetsillumos)' == 'true' or '$(TargetsSolaris)' == 'true' or '$(TargetsHaiku)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsNetBSD)' == 'true' or '$(TargetsOSX)' == 'true' or '$(TargetsMacCatalyst)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetsAndroid)' == 'true'">true</TargetsUnix> |
297 |
| - </PropertyGroup> |
| 169 | + <Import Project="$(RepositoryEngineeringDir)RuntimeIdentifier.props" /> |
298 | 170 |
|
299 | 171 | <PropertyGroup>
|
300 | 172 | <MicrosoftNetCoreAppRefPackDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'microsoft.netcore.app.ref'))</MicrosoftNetCoreAppRefPackDir>
|
|
0 commit comments