1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 11:40:45 +00:00

config.enableParallelBuildingByDefault: init option

useful for testing if some builds could be faster
This commit is contained in:
Artturin 2022-05-11 16:41:30 +03:00
parent b135d3b223
commit a17e1b8809
2 changed files with 7 additions and 1 deletions

View file

@ -135,6 +135,8 @@ makeOverlayable (overrideAttrs:
, # TODO(@Ericson2314): Make always true and remove
strictDeps ? if config.strictDepsByDefault then true else stdenv.hostPlatform != stdenv.buildPlatform
, enableParallelBuilding ? config.enableParallelBuildingByDefault
, meta ? {}
, passthru ? {}
, pos ? # position used in error messages and for meta.position
@ -377,7 +379,7 @@ else let
llvm-config = 'llvm-config-native'
'';
in [ "--cross-file=${crossFile}" ] ++ mesonFlags;
} // lib.optionalAttrs (attrs.enableParallelBuilding or false) {
} // lib.optionalAttrs (enableParallelBuilding) {
enableParallelChecking = attrs.enableParallelChecking or true;
} // lib.optionalAttrs (hardeningDisable != [] || hardeningEnable != [] || stdenv.hostPlatform.isMusl) {
NIX_HARDENING_ENABLE = enabledHardeningOptions;

View file

@ -36,6 +36,10 @@ let
feature = "set <literal>strictDeps</literal> to true by default";
};
enableParallelBuildingByDefault = mkMassRebuild {
feature = "set <literal>enableParallelBuilding</literal> to true by default";
};
contentAddressedByDefault = mkMassRebuild {
feature = "set <literal>__contentAddressed</literal> to true by default";
};