Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identify riscv64 as valid arch #37994

Merged
merged 5 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
akoeplinger marked this conversation as resolved.
Show resolved Hide resolved
break;
#endif
case "x64":
architecture = Architecture.X64;
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ Copyright (c) .NET Foundation. All rights reserved.
<PropertyGroup Condition=" '$(_PlatformWithoutConfigurationInference)' == 'arm64' ">
<PlatformTarget Condition=" '$(PlatformTarget)' == '' ">arm64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(_PlatformWithoutConfigurationInference)' == 'riscv64' ">
<PlatformTarget Condition=" '$(PlatformTarget)' == '' ">riscv64</PlatformTarget>
</PropertyGroup>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd remove the PlatformTarget here too.


<!-- Default settings for all projects built with this Sdk package -->

Expand Down