Merge pull request #93568 from aaronjanse/aj-redox
Add Redox OS as a target
This commit is contained in:
@@ -32,6 +32,7 @@ rec {
|
||||
/**/ if final.isDarwin then "libSystem"
|
||||
else if final.isMinGW then "msvcrt"
|
||||
else if final.isWasi then "wasilibc"
|
||||
else if final.isRedox then "relibc"
|
||||
else if final.isMusl then "musl"
|
||||
else if final.isUClibc then "uclibc"
|
||||
else if final.isAndroid then "bionic"
|
||||
@@ -65,6 +66,7 @@ rec {
|
||||
freebsd = "FreeBSD";
|
||||
openbsd = "OpenBSD";
|
||||
wasi = "Wasi";
|
||||
redox = "Redox";
|
||||
genode = "Genode";
|
||||
}.${final.parsed.kernel.name} or null;
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ let
|
||||
|
||||
"wasm64-wasi" "wasm32-wasi"
|
||||
|
||||
"x86_64-redox"
|
||||
|
||||
"powerpc64le-linux"
|
||||
|
||||
"riscv32-linux" "riscv64-linux"
|
||||
@@ -69,6 +71,7 @@ in {
|
||||
openbsd = filterDoubles predicates.isOpenBSD;
|
||||
unix = filterDoubles predicates.isUnix;
|
||||
wasi = filterDoubles predicates.isWasi;
|
||||
redox = filterDoubles predicates.isRedox;
|
||||
windows = filterDoubles predicates.isWindows;
|
||||
genode = filterDoubles predicates.isGenode;
|
||||
|
||||
|
||||
@@ -163,6 +163,15 @@ rec {
|
||||
libc = "newlib";
|
||||
};
|
||||
|
||||
#
|
||||
# Redox
|
||||
#
|
||||
|
||||
x86_64-unknown-redox = {
|
||||
config = "x86_64-unknown-redox";
|
||||
libc = "relibc";
|
||||
};
|
||||
|
||||
#
|
||||
# Darwin
|
||||
#
|
||||
|
||||
@@ -33,7 +33,7 @@ rec {
|
||||
|
||||
isBSD = { kernel = { families = { inherit (kernelFamilies) bsd; }; }; };
|
||||
isDarwin = { kernel = { families = { inherit (kernelFamilies) darwin; }; }; };
|
||||
isUnix = [ isBSD isDarwin isLinux isSunOS isCygwin ];
|
||||
isUnix = [ isBSD isDarwin isLinux isSunOS isCygwin isRedox ];
|
||||
|
||||
isMacOS = { kernel = kernels.macos; };
|
||||
isiOS = { kernel = kernels.ios; };
|
||||
@@ -46,6 +46,7 @@ rec {
|
||||
isCygwin = { kernel = kernels.windows; abi = abis.cygnus; };
|
||||
isMinGW = { kernel = kernels.windows; abi = abis.gnu; };
|
||||
isWasi = { kernel = kernels.wasi; };
|
||||
isRedox = { kernel = kernels.redox; };
|
||||
isGhcjs = { kernel = kernels.ghcjs; };
|
||||
isGenode = { kernel = kernels.genode; };
|
||||
isNone = { kernel = kernels.none; };
|
||||
|
||||
@@ -277,6 +277,7 @@ rec {
|
||||
openbsd = { execFormat = elf; families = { inherit bsd; }; };
|
||||
solaris = { execFormat = elf; families = { }; };
|
||||
wasi = { execFormat = wasm; families = { }; };
|
||||
redox = { execFormat = elf; families = { }; };
|
||||
windows = { execFormat = pe; families = { }; };
|
||||
ghcjs = { execFormat = unknown; families = { }; };
|
||||
genode = { execFormat = elf; families = { }; };
|
||||
@@ -390,6 +391,8 @@ rec {
|
||||
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = "windows"; }
|
||||
else if (elemAt l 2 == "wasi")
|
||||
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = "wasi"; }
|
||||
else if (elemAt l 2 == "redox")
|
||||
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = "redox"; }
|
||||
else if hasPrefix "netbsd" (elemAt l 2)
|
||||
then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; }
|
||||
else if (elem (elemAt l 2) ["eabi" "eabihf" "elf"])
|
||||
|
||||
@@ -12,22 +12,23 @@ let
|
||||
expected = lib.sort lib.lessThan y;
|
||||
};
|
||||
in with lib.systems.doubles; lib.runTests {
|
||||
testall = mseteq all (linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos ++ wasi ++ windows ++ embedded ++ js ++ genode);
|
||||
testall = mseteq all (linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos ++ wasi ++ windows ++ embedded ++ js ++ genode ++ redox);
|
||||
|
||||
testarm = mseteq arm [ "armv5tel-linux" "armv6l-linux" "armv6l-none" "armv7a-linux" "armv7l-linux" "arm-none" "armv7a-darwin" ];
|
||||
testi686 = mseteq i686 [ "i686-linux" "i686-freebsd" "i686-netbsd" "i686-openbsd" "i686-cygwin" "i686-windows" "i686-none" "i686-darwin" ];
|
||||
testmips = mseteq mips [ "mipsel-linux" ];
|
||||
testx86_64 = mseteq x86_64 [ "x86_64-linux" "x86_64-darwin" "x86_64-freebsd" "x86_64-genode" "x86_64-openbsd" "x86_64-netbsd" "x86_64-cygwin" "x86_64-solaris" "x86_64-windows" "x86_64-none" ];
|
||||
testx86_64 = mseteq x86_64 [ "x86_64-linux" "x86_64-darwin" "x86_64-freebsd" "x86_64-genode" "x86_64-redox" "x86_64-openbsd" "x86_64-netbsd" "x86_64-cygwin" "x86_64-solaris" "x86_64-windows" "x86_64-none" ];
|
||||
|
||||
testcygwin = mseteq cygwin [ "i686-cygwin" "x86_64-cygwin" ];
|
||||
testdarwin = mseteq darwin [ "x86_64-darwin" "i686-darwin" "aarch64-darwin" "armv7a-darwin" ];
|
||||
testfreebsd = mseteq freebsd [ "i686-freebsd" "x86_64-freebsd" ];
|
||||
testgenode = mseteq genode [ "aarch64-genode" "x86_64-genode" ];
|
||||
testredox = mseteq redox [ "x86_64-redox" ];
|
||||
testgnu = mseteq gnu (linux /* ++ kfreebsd ++ ... */);
|
||||
testillumos = mseteq illumos [ "x86_64-solaris" ];
|
||||
testlinux = mseteq linux [ "aarch64-linux" "armv5tel-linux" "armv6l-linux" "armv7a-linux" "armv7l-linux" "i686-linux" "mipsel-linux" "riscv32-linux" "riscv64-linux" "x86_64-linux" "powerpc64le-linux" ];
|
||||
testnetbsd = mseteq netbsd [ "i686-netbsd" "x86_64-netbsd" ];
|
||||
testopenbsd = mseteq openbsd [ "i686-openbsd" "x86_64-openbsd" ];
|
||||
testwindows = mseteq windows [ "i686-cygwin" "x86_64-cygwin" "i686-windows" "x86_64-windows" ];
|
||||
testunix = mseteq unix (linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos ++ cygwin);
|
||||
testunix = mseteq unix (linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos ++ cygwin ++ redox);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user