about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-04-26 13:07:19 +0000
committerAlyssa Ross <hi@alyssa.is>2023-04-28 10:01:22 +0000
commite5d1511d5b058786ea5ad87bdcca1275283850fa (patch)
treeaac30611f8e32d26576c2c6b52da3c88617c3c5b /lib
parent3e0cb1ab7d27ee531915948c751c612c850e77a5 (diff)
downloadnixlib-e5d1511d5b058786ea5ad87bdcca1275283850fa.tar
nixlib-e5d1511d5b058786ea5ad87bdcca1275283850fa.tar.gz
nixlib-e5d1511d5b058786ea5ad87bdcca1275283850fa.tar.bz2
nixlib-e5d1511d5b058786ea5ad87bdcca1275283850fa.tar.lz
nixlib-e5d1511d5b058786ea5ad87bdcca1275283850fa.tar.xz
nixlib-e5d1511d5b058786ea5ad87bdcca1275283850fa.tar.zst
nixlib-e5d1511d5b058786ea5ad87bdcca1275283850fa.zip
lib.systems: allow specifying libc = null
It makes sense to allow platform definitions to opt out of having libc
at all.  One use case would be targetting some obscure new Linux
target that doesn't have a libc implementation yet, and another is
UEFI, which is basically libc-less Windows.

Not having libc is not commonly specified in (GNU) triples (even
Linux's build system will just target either -gnu or -musl depending
on the platform), so instead, we use a separate attribute for it.
Diffstat (limited to 'lib')
-rw-r--r--lib/systems/default.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/systems/default.nix b/lib/systems/default.nix
index b2cb8848f08b..19ba594d535d 100644
--- a/lib/systems/default.nix
+++ b/lib/systems/default.nix
@@ -50,6 +50,7 @@ rec {
         else if final.isFreeBSD             then "fblibc"
         else if final.isNetBSD              then "nblibc"
         else if final.isAvr                 then "avrlibc"
+        else if final.isGhcjs               then null
         else if final.isNone                then "newlib"
         # TODO(@Ericson2314) think more about other operating systems
         else                                     "native/impure";