File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,16 @@ public enum Platform
40
40
/// <summary>
41
41
/// LOONGARCH64
42
42
/// </summary>
43
- LoongArch64
43
+ LoongArch64 ,
44
+
45
+ /// <summary>
46
+ /// A 32-bit ARMv6 processor architecture.
47
+ /// </summary>
48
+ Armv6 ,
49
+
50
+ /// <summary>
51
+ /// A PowerPC 64-bit (little-endian) processor architecture.
52
+ /// </summary>
53
+ Ppc64le ,
44
54
}
45
55
}
Original file line number Diff line number Diff line change @@ -263,11 +263,13 @@ internal static Runtime GetCurrentRuntime()
263
263
264
264
public static Platform GetCurrentPlatform ( )
265
265
{
266
- // these are not part of .NET Standard 2.0, so we use a hack
267
- // https://github.com/dotnet/runtime/blob/d81ad044fa6830f5f31f6b6e8224ebf66a3c298c /src/libraries/System.Runtime.InteropServices.RuntimeInformation /src/System/Runtime/InteropServices/RuntimeInformation/ Architecture.cs#L12-L13
266
+ // these are not part of .NET Standard 2.0, so we use hardcoded values taken from
267
+ // https://github.com/dotnet/runtime/blob/1a37caf773a3b857ccff49a31be3333d4fdc491f /src/libraries/System.Private.CoreLib /src/System/Runtime/InteropServices/Architecture.cs#L9
268
268
const Architecture Wasm = ( Architecture ) 4 ;
269
269
const Architecture S390x = ( Architecture ) 5 ;
270
270
const Architecture LoongArch64 = ( Architecture ) 6 ;
271
+ const Architecture Armv6 = ( Architecture ) 7 ;
272
+ const Architecture Ppc64le = ( Architecture ) 8 ;
271
273
272
274
switch ( ProcessArchitecture )
273
275
{
@@ -285,6 +287,10 @@ public static Platform GetCurrentPlatform()
285
287
return Platform . S390x ;
286
288
case LoongArch64 :
287
289
return Platform . LoongArch64 ;
290
+ case Armv6 :
291
+ return Platform . Armv6 ;
292
+ case Ppc64le :
293
+ return Platform . Ppc64le ;
288
294
default :
289
295
throw new ArgumentOutOfRangeException ( ) ;
290
296
}
You can’t perform that action at this time.
0 commit comments