Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Updating arch support for arm (#4085)
Browse files Browse the repository at this point in the history
* Updating arch support for arm

* Switching to process instead of OS arch
  • Loading branch information
Petermarcu authored Apr 30, 2018
1 parent 0fab159 commit 63dcd37
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Runtime.InteropServices;
using Microsoft.DotNet.PlatformAbstractions.Native;

namespace Microsoft.DotNet.PlatformAbstractions
Expand All @@ -23,7 +24,7 @@ private static string GetArch()
#if NET45
return Environment.Is64BitProcess ? "x64" : "x86";
#else
return IntPtr.Size == 8 ? "x64" : "x86";
return RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant();
#endif
}

Expand All @@ -36,11 +37,7 @@ public static string GetRuntimeIdentifier()

private static string GetRIDArch()
{
if (!string.IsNullOrEmpty(RuntimeArchitecture))
{
return $"-{RuntimeArchitecture.ToLowerInvariant()}";
}
return string.Empty;
return $"-{RuntimeArchitecture}";
}

private static string GetRIDVersion()
Expand Down

0 comments on commit 63dcd37

Please sign in to comment.