Skip to content

Commit cf8c245

Browse files
authored
Identify loongarch64 as valid arch (#40169)
1 parent 6f8dde2 commit cf8c245

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ private static IReadOnlyDictionary<string, PlatformSpecificManifest> GetManifest
234234
"ppc64le" => "ppc64le",
235235
"s390x" => "s390x",
236236
"riscv64" => "riscv64",
237+
"loongarch64" => "loongarch64",
237238
_ => null
238239
};
239240

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ protected override void ExecuteCore()
4343
RuntimeIdentifier.EndsWith("-arm") || RuntimeIdentifier.Contains("-arm-") ? Architecture.Arm :
4444
#if !NETFRAMEWORK
4545
RuntimeIdentifier.EndsWith("-riscv64") || RuntimeIdentifier.Contains("-riscv64-") ? Architecture.RiscV64 :
46+
RuntimeIdentifier.EndsWith("-loongarch64") || RuntimeIdentifier.Contains("-loongarch64-") ? Architecture.LoongArch64 :
4647
#endif
4748
throw new ArgumentException(nameof(RuntimeIdentifier));
4849

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ private static bool ExtractTargetPlatformAndArchitecture(string runtimeIdentifie
261261
case "riscv64":
262262
architecture = Architecture.RiscV64;
263263
break;
264+
case "loongarch64":
265+
architecture = Architecture.LoongArch64;
266+
break;
264267
#endif
265268
case "x64":
266269
architecture = Architecture.X64;
@@ -431,6 +434,7 @@ private static string ArchitectureToString(Architecture architecture)
431434
Architecture.Arm64 => "arm64",
432435
#if !NETFRAMEWORK
433436
Architecture.RiscV64 => "riscv64",
437+
Architecture.LoongArch64 => "loongarch64",
434438
#endif
435439
_ => null
436440
};

0 commit comments

Comments
 (0)