Skip to content

Commit 537ceda

Browse files
committed
sync std.system and phobos.sys.system
1 parent 123e6e7 commit 537ceda

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

phobos/sys/system.d

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// Written in the D programming language.
2+
//
3+
// NOTE: This must be kept in sync with std/system.d
24

35
/**
46
* Information about the target operating system, environment, and CPU.
@@ -126,6 +128,9 @@ immutable
126128
sh, /// The SuperH architecture, 32-bit
127129
webAssembly, /// The WebAssembly virtual ISA (instruction set architecture), 32-bit
128130
alpha, /// The Alpha architecture
131+
loongArch32, /// The LoongAtch architecture, 32-bit
132+
loongArch64, /// The LoongArch architecture, 64-bit
133+
xtensa, /// The Xtensa architecture, 32-bit
129134
unknown, /// Unknown
130135
}
131136

@@ -156,5 +161,8 @@ immutable
156161
else version (SH) ISA instructionSetArchitecture = ISA.sh;
157162
else version (WebAssembly) ISA instructionSetArchitecture = ISA.webAssembly;
158163
else version (Alpha) ISA instructionSetArchitecture = ISA.alpha;
164+
else version (LoongArch32) ISA instructionSetArchitecture = ISA.loongArch32;
165+
else version (loongArch64) ISA instructionSetArchitecture = ISA.loongArch64;
166+
else version (Xtensa) ISA instructionSetArchitecture = ISA.xtensa;
159167
else ISA instructionSetArchitecture = ISA.unknown;
160168
}

std/system.d

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// Written in the D programming language.
2+
//
3+
// NOTE: This must be kept in sync with phobos/sys/system.d
24

35
/**
46
* Information about the target operating system, environment, and CPU.
@@ -39,6 +41,7 @@ immutable
3941
openBSD, /// OpenBSD
4042
dragonFlyBSD, /// DragonFlyBSD
4143
solaris, /// Solaris
44+
haiku, /// HaikuOS
4245
android, /// Android
4346
otherPosix, /// Other Posix Systems
4447
unknown, /// Unknown
@@ -58,7 +61,7 @@ immutable
5861
else version (OpenBSD) OS os = OS.openBSD;
5962
else version (DragonFlyBSD) OS os = OS.dragonFlyBSD;
6063
else version (Solaris) OS os = OS.solaris;
61-
else version (Android) OS os = OS.android;
64+
else version (Haiku) OS os = OS.haiku;
6265
else version (Posix) OS os = OS.otherPosix;
6366
else OS os = OS.unknown;
6467

0 commit comments

Comments
 (0)