2018-12-13 06:13:30 +00:00
|
|
|
{ lib }:
|
|
|
|
|
|
|
|
rec {
|
|
|
|
llvmBackend = platform:
|
2018-12-24 14:38:52 +00:00
|
|
|
if builtins.typeOf platform == "string" then
|
|
|
|
platform
|
|
|
|
else if platform.parsed.cpu.family == "x86" then
|
2018-12-13 06:13:30 +00:00
|
|
|
"X86"
|
|
|
|
else if platform.parsed.cpu.name == "aarch64" then
|
|
|
|
"AArch64"
|
|
|
|
else if platform.parsed.cpu.family == "arm" then
|
|
|
|
"ARM"
|
|
|
|
else if platform.parsed.cpu.family == "mips" then
|
|
|
|
"Mips"
|
|
|
|
else
|
|
|
|
throw "Unsupported system";
|
|
|
|
|
|
|
|
llvmBackendList = platforms:
|
|
|
|
lib.concatStringsSep ";" (map llvmBackend platforms);
|
|
|
|
}
|