query
On this page

libcCrossChooser

pkgs.libcCrossChooser

Docs pulled from | This Revision | 14 minutes ago


We can choose:


Noogle detected

Implementation

The following is the current implementation of this function.

libcCrossChooser = name:
    # libc is hackily often used from the previous stage. This `or`
    # hack fixes the hack, *sigh*.
    /**/ if name == null then null
    else if name == "glibc" then targetPackages.glibcCross or glibcCross
    else if name == "bionic" then targetPackages.bionic or bionic
    else if name == "uclibc" then targetPackages.uclibc or uclibc
    else if name == "avrlibc" then targetPackages.avrlibc or avrlibc
    else if name == "newlib" && stdenv.targetPlatform.isMsp430 then targetPackages.msp430Newlib or msp430Newlib
    else if name == "newlib" && stdenv.targetPlatform.isVc4 then targetPackages.vc4-newlib or vc4-newlib
    else if name == "newlib" && stdenv.targetPlatform.isOr1k then targetPackages.or1k-newlib or or1k-newlib
    else if name == "newlib" then targetPackages.newlib or newlib
    else if name == "newlib-nano" then targetPackages.newlib-nano or newlib-nano
    else if name == "musl" then targetPackages.muslCross or muslCross
    else if name == "msvcrt" then targetPackages.windows.mingw_w64 or windows.mingw_w64
    else if name == "ucrt" then targetPackages.windows.mingw_w64 or windows.mingw_w64
    else if name == "libSystem" then
      if stdenv.targetPlatform.useiOSPrebuilt
      then targetPackages.darwin.iosSdkPkgs.libraries or darwin.iosSdkPkgs.libraries
      else targetPackages.darwin.libSystem or darwin.libSystem
    else if name == "fblibc" then targetPackages.freebsd.libc or freebsd.libc
    else if name == "oblibc" then targetPackages.openbsd.libc or openbsd.libc
    else if name == "nblibc" then targetPackages.netbsd.libc or netbsd.libc
    else if name == "wasilibc" then targetPackages.wasilibc or wasilibc
    else if name == "relibc" then targetPackages.relibc or relibc
    else throw "Unknown libc ${name}";