mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[Optimizations] Enable lto by default + recursively optimize one level if needed
This commit is contained in:
parent
d3e80fda86
commit
2a7d942702
1 changed files with 8 additions and 1 deletions
|
|
@ -14,6 +14,9 @@ let
|
|||
extraCFlags ? cfg.extraCompileFlags,
|
||||
blacklist ? cfg.blacklist,
|
||||
overrideMap ? cfg.overrideMap,
|
||||
recursive ? 1,
|
||||
level ? "slower",
|
||||
lto ? cfg.lto,
|
||||
...
|
||||
}@attrs: pkg:
|
||||
myLib.optimizations.optimizePkg pkg ({
|
||||
|
|
@ -27,7 +30,11 @@ in {
|
|||
description = "Enable aviallon's optimizations";
|
||||
type = types.bool;
|
||||
};
|
||||
lto = mkEnableOption "enable LTO for some packages";
|
||||
lto = mkOption {
|
||||
description = "Wether to enable LTO for some packages";
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
extraCompileFlags = mkOption {
|
||||
default = [ "-mtune=${generalCfg.cpuTune}" ];
|
||||
example = [ "-O2" "-mavx" ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue