ngn-k: build k-libc flavor by default
Can be disabled by passing { withLibc = false; } via overriding
This commit is contained in:
parent
5822bee639
commit
f68fdcfc4e
1 changed files with 9 additions and 4 deletions
|
@ -3,12 +3,14 @@
|
|||
, stdenvNoLibs
|
||||
, fetchFromGitea
|
||||
, runtimeShell
|
||||
, doCheck ? stdenv.hostPlatform == stdenv.buildPlatform
|
||||
, doCheck ? withLibc && stdenv.hostPlatform == stdenv.buildPlatform
|
||||
, withLibc ? true
|
||||
}:
|
||||
|
||||
let
|
||||
# k itself is compiled with -ffreestanding, but tests require a libc
|
||||
useStdenv = if doCheck then stdenv else stdenvNoLibs;
|
||||
# k itself can be compiled with -ffreestanding, but tests require a libc;
|
||||
# if we want to build k-libc we need a libc obviously
|
||||
useStdenv = if withLibc || doCheck then stdenv else stdenvNoLibs;
|
||||
in
|
||||
|
||||
useStdenv.mkDerivation {
|
||||
|
@ -37,7 +39,10 @@ useStdenv.mkDerivation {
|
|||
'';
|
||||
|
||||
makeFlags = [ "-e" ];
|
||||
buildFlags = [ "k" "libk.so" ];
|
||||
buildFlags = [
|
||||
(if withLibc then "k-libc" else "k")
|
||||
"libk.so"
|
||||
];
|
||||
checkTarget = "t";
|
||||
inherit doCheck;
|
||||
|
||||
|
|
Loading…
Reference in a new issue