Skip to content

Commit

Permalink
Identify riscv64 as valid arch (#37994)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
  • Loading branch information
am11 and akoeplinger authored Jan 19, 2024
1 parent 0a4beb7 commit 734bbd9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ private static IReadOnlyDictionary<string, PlatformSpecificManifest> GetManifest
"arm64" => "arm64",
"ppc64le" => "ppc64le",
"s390x" => "s390x",
"riscv64" => "riscv64",
_ => null
};

Expand Down
3 changes: 3 additions & 0 deletions src/Tasks/Microsoft.NET.Build.Tasks/GenerateBundle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ protected override void ExecuteCore()
RuntimeIdentifier.EndsWith("-x86") || RuntimeIdentifier.Contains("-x86-") ? Architecture.X86 :
RuntimeIdentifier.EndsWith("-arm64") || RuntimeIdentifier.Contains("-arm64-") ? Architecture.Arm64 :
RuntimeIdentifier.EndsWith("-arm") || RuntimeIdentifier.Contains("-arm-") ? Architecture.Arm :
#if !NETFRAMEWORK
RuntimeIdentifier.EndsWith("-riscv64") || RuntimeIdentifier.Contains("-riscv64-") ? Architecture.RiscV64 :
#endif
throw new ArgumentException(nameof(RuntimeIdentifier));

BundleOptions options = BundleOptions.None;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,11 @@ private static bool ExtractTargetPlatformAndArchitecture(string runtimeIdentifie
case "arm64":
architecture = Architecture.Arm64;
break;
#if !NETFRAMEWORK
case "riscv64":
architecture = Architecture.RiscV64;
break;
#endif
case "x64":
architecture = Architecture.X64;
break;
Expand Down

0 comments on commit 734bbd9

Please sign in to comment.