Skip to content

Commit fa36e9d

Browse files
authored
Add missing metadata for haiku-x64 (#51855)
1 parent 380e146 commit fa36e9d

File tree

5 files changed

+60
-12
lines changed

5 files changed

+60
-12
lines changed

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<HostOSName Condition="'$(HostOSName)' == '' AND $([MSBuild]::IsOSPlatform('OSX'))">osx</HostOSName>
2121
<HostOSName Condition="'$(HostOSName)' == '' AND $([MSBuild]::IsOSPlatform('FREEBSD'))">freebsd</HostOSName>
2222
<HostOSName Condition="'$(HostOSName)' == '' AND $([MSBuild]::IsOSPlatform('ILLUMOS'))">illumos</HostOSName>
23+
<HostOSName Condition="'$(HostOSName)' == '' AND $([MSBuild]::IsOSPlatform('HAIKU'))">haiku</HostOSName>
2324
<HostOSName Condition="'$(HostOSName)' == '' AND '$(IsLinux)' == 'true'">linux</HostOSName>
2425

2526
<OSName Condition="'$(OSName)' == '' AND $(PortableTargetRid) != ''">$(PortableTargetRid.Substring(0, $(PortableTargetRid.LastIndexOf('-'))))</OSName>

src/Layout/Directory.Build.props

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
(
4545
$(TargetRid.StartsWith('freebsd')) or
4646
$(TargetRid.StartsWith('illumos')) or
47+
$(TargetRid.StartsWith('haiku')) or
4748
$(TargetRid.StartsWith('linux-musl'))
4849
)">true</SkipBuildingInstallers>
4950
</PropertyGroup>
@@ -53,7 +54,7 @@
5354
<BundleRuntimePacks Condition="'$(BundleRuntimePacks)' == '' and '$(DotNetBuildSourceOnly)' == 'true'">true</BundleRuntimePacks>
5455
<BundleNativeAotCompiler Condition="'$(BundleNativeAotCompiler)' == '' and '$(DotNetBuildSourceOnly)' == 'true' and '$(DotNetBuildUseMonoRuntime)' != 'true'">true</BundleNativeAotCompiler>
5556

56-
<!-- Crossgen2 is not bundled by default on platforms where Microsoft provides a package on nuget.org,
57+
<!-- Crossgen2 is not bundled by default on platforms where Microsoft provides a package on nuget.org,
5758
because it is large (100MB+). -->
5859
<_IsCommunityPlatform Condition="'$(OSName)' != 'win' and '$(OSName)' != 'osx'
5960
and !(('$(OSName)' == 'linux' or '$(OSName)' == 'linux-musl') and ('$(TargetArchitecture)' == 'x64' or '$(TargetArchitecture)' == 'x86' or '$(TargetArchitecture)' == 'arm' or '$(TargetArchitecture)' == 'arm64'))">true</_IsCommunityPlatform>
@@ -66,7 +67,7 @@
6667

6768
<PropertyGroup>
6869
<NetRuntimeRid Condition="'$(NetRuntimeRid)' == ''">$(HostRid)</NetRuntimeRid>
69-
<NetRuntimeRid Condition="('$(OSName)' == 'win' or '$(OSName)' == 'osx' or '$(OSName)' == 'freebsd' or '$(OSName)' == 'illumos' or '$(OSName)' == 'solaris') and '$(DotNetBuildSourceOnly)' != 'true'">$(OSName)-$(TargetArchitecture)</NetRuntimeRid>
70+
<NetRuntimeRid Condition="('$(OSName)' == 'win' or '$(OSName)' == 'osx' or '$(OSName)' == 'freebsd' or '$(OSName)' == 'illumos' or '$(OSName)' == 'solaris' or '$(OSName)' == 'haiku') and '$(DotNetBuildSourceOnly)' != 'true'">$(OSName)-$(TargetArchitecture)</NetRuntimeRid>
7071
<NetRuntimeRid Condition="'$(DotNetBuild)' != 'true' and $(NetRuntimeRid.StartsWith('mariner.2.0'))">$(HostRid.Replace('mariner.2.0', 'cm.2'))</NetRuntimeRid>
7172

7273
<SharedFrameworkRid>$(NetRuntimeRid)</SharedFrameworkRid>

src/Layout/redist/targets/GenerateBundledVersions.targets

Lines changed: 53 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,15 @@
252252
android-x64;
253253
" />
254254

255+
<Net100AppHostRids Include="
256+
@(Net90AppHostRids);
257+
" />
258+
259+
<Net110AppHostRids Include="
260+
@(Net100AppHostRids);
261+
haiku-x64;
262+
" />
263+
255264
<Net110RuntimePackRids Include="
256265
@(Net100RuntimePackRids);
257266
ios-arm64;
@@ -262,9 +271,10 @@
262271
tvossimulator-x64;
263272
maccatalyst-x64;
264273
maccatalyst-arm64;
274+
haiku-x64;
265275
" />
266276

267-
<NetCoreAppHostRids Include="@(Net90AppHostRids)" />
277+
<NetCoreAppHostRids Include="@(Net110AppHostRids)" />
268278

269279
<NetCoreRuntimePackRids Include="@(Net110RuntimePackRids)" />
270280

@@ -331,7 +341,16 @@
331341
linux-musl-loongarch64;
332342
" />
333343

334-
<MonoRuntimePackRids Include="@(Net90MonoRuntimePackRids)" />
344+
<Net100MonoRuntimePackRids Include="
345+
@(Net90MonoRuntimePackRids);
346+
" />
347+
348+
<Net110MonoRuntimePackRids Include="
349+
@(Net100MonoRuntimePackRids);
350+
haiku-x64;
351+
" />
352+
353+
<MonoRuntimePackRids Include="@(Net110MonoRuntimePackRids)" />
335354

336355
<AspNetCore30RuntimePackRids Include="
337356
win-x64;
@@ -378,7 +397,16 @@
378397
linux-musl-loongarch64;
379398
" />
380399

381-
<Crossgen2SupportedRids Include="@(Net90Crossgen2SupportedRids);" />
400+
<Net100Crossgen2SupportedRids Include="
401+
@(Net90Crossgen2SupportedRids);
402+
" />
403+
404+
<Net110Crossgen2SupportedRids Include="
405+
@(Net100Crossgen2SupportedRids);
406+
haiku-x64;
407+
" />
408+
409+
<Crossgen2SupportedRids Include="@(Net110Crossgen2SupportedRids);" />
382410

383411
<Crossgen2SupportedPortableRids Include="@(Crossgen2SupportedRids)" />
384412

@@ -412,14 +440,21 @@
412440
win-x86;
413441
" />
414442

415-
<!-- ILCompiler target RIDs that are officially supported, plus the architecture we are building the product for (TargetRid). See:
416-
https://github.com/dotnet/runtime/blob/main/src/installer/pkg/projects/Microsoft.DotNet.ILCompiler/ILCompilerRIDs.props -->
417-
<ILCompilerSupportedRids Include="
443+
<Net100ILCompilerSupportedRids Include="
418444
@(Net90ILCompilerSupportedRids);
419445
linux-riscv64;
420446
linux-musl-riscv64;
421447
" />
422448

449+
<Net110ILCompilerSupportedRids Include="
450+
@(Net100ILCompilerSupportedRids);
451+
haiku-x64;
452+
" />
453+
454+
<!-- ILCompiler target RIDs that are officially supported, plus the architecture we are building the product for (TargetRid). See:
455+
https://github.com/dotnet/runtime/blob/main/src/installer/pkg/projects/Microsoft.DotNet.ILCompiler/ILCompilerRIDs.props -->
456+
<ILCompilerSupportedRids Include="@(Net110ILCompilerSupportedRids)" />
457+
423458
<ILCompilerSupportedPortableRids Include="@(ILCompilerSupportedRids)" />
424459

425460
<ILCompilerSupportedRids
@@ -461,13 +496,20 @@
461496
wasi-wasm;
462497
" />
463498

464-
<NativeAOTRuntimePackRids Include="
499+
<Net100NativeAOTRuntimePackRids Include="
465500
@(Net90NativeAOTRuntimePackRids);
466501
linux-riscv64;
467502
linux-musl-riscv64;
468503
android-arm64;
469504
android-x64;
470-
"/>
505+
" />
506+
507+
<Net110NativeAOTRuntimePackRids Include="
508+
@(Net100NativeAOTRuntimePackRids);
509+
haiku-x64;
510+
" />
511+
512+
<NativeAOTRuntimePackRids Include="@(Net110NativeAOTRuntimePackRids)" />
471513

472514
<AspNetCore31RuntimePackRids Include="@(AspNetCore30RuntimePackRids)" />
473515
<AspNetCore50RuntimePackRids Include="@(AspNetCore31RuntimePackRids);linux-musl-arm;win-arm64" />
@@ -476,7 +518,9 @@
476518
<AspNetCore80RuntimePackRids Include="@(AspNetCore70RuntimePackRids);freebsd-x64;freebsd-arm64" />
477519
<AspNetCore80RuntimePackRids Remove="win-arm" />
478520
<AspNetCore90RuntimePackRids Include="@(AspNetCore80RuntimePackRids);linux-riscv64;linux-musl-riscv64;linux-loongarch64;linux-musl-loongarch64;" />
479-
<AspNetCoreRuntimePackRids Include="@(AspNetCore90RuntimePackRids)" />
521+
<AspNetCore100RuntimePackRids Include="@(AspNetCore90RuntimePackRids)" />
522+
<AspNetCore110RuntimePackRids Include="@(AspNetCore100RuntimePackRids);haiku-x64" />
523+
<AspNetCoreRuntimePackRids Include="@(AspNetCore110RuntimePackRids)" />
480524

481525
<WindowsDesktop30RuntimePackRids Include="win-x64;win-x86" />
482526
<WindowsDesktop31RuntimePackRids Include="@(WindowsDesktop30RuntimePackRids)" />

src/Tasks/Microsoft.NET.Build.Tasks/GenerateBundle.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ private async Task ExecuteWithRetry()
5656
RuntimeIdentifier.StartsWith("osx") ? OSPlatform.OSX :
5757
RuntimeIdentifier.StartsWith("freebsd") ? OSPlatform.Create("FREEBSD") :
5858
RuntimeIdentifier.StartsWith("illumos") ? OSPlatform.Create("ILLUMOS") :
59+
RuntimeIdentifier.StartsWith("haiku") ? OSPlatform.Create("HAIKU") :
5960
OSPlatform.Linux;
6061

6162
Architecture targetArch = RuntimeIdentifier.EndsWith("-x64") || RuntimeIdentifier.Contains("-x64-") ? Architecture.X64 :

src/Tasks/Microsoft.NET.Build.Tasks/ResolveReadyToRunCompilers.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ private bool GetCrossgen2TargetOS(out string targetOS)
210210
string portablePlatform = NuGetUtils.GetBestMatchingRid(
211211
runtimeGraph,
212212
_targetRuntimeIdentifier,
213-
new[] { "linux", "osx", "win", "freebsd", "illumos" },
213+
["linux", "osx", "win", "freebsd", "illumos", "haiku"],
214214
out _);
215215

216216
targetOS = portablePlatform switch
@@ -220,6 +220,7 @@ private bool GetCrossgen2TargetOS(out string targetOS)
220220
"win" => "windows",
221221
"freebsd" => "freebsd",
222222
"illumos" => "illumos",
223+
"haiku" => "haiku",
223224
_ => null
224225
};
225226

0 commit comments

Comments
 (0)