mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[Boot] add KRUSTFLAGS to kernel build
This commit is contained in:
parent
ec9cfceda6
commit
de157af8a9
1 changed files with 7 additions and 1 deletions
8
boot.nix
8
boot.nix
|
|
@ -256,12 +256,19 @@ in {
|
|||
++ optional (! isNull cpuConfig.caches.lastLevel ) "--param l2-cache-size=${toString cpuConfig.caches.lastLevel}"
|
||||
++ optional (! isNull cpuConfig.caches.l1d ) "--param l1-cache-size=${toString cpuConfig.caches.l1d}"
|
||||
);
|
||||
kRustflags = traceValWithPrefix "kRustflags" (
|
||||
[
|
||||
"-Ctarget-cpu=${cpuConfig.arch}"
|
||||
"-Ctune-cpu=${cpuConfig.tune or cpuConfig.arch}"
|
||||
]
|
||||
);
|
||||
|
||||
optimizedKernelAttrs = traceValWithPrefix "optimizedKernelAttrs" (
|
||||
optionalAttrs config.aviallon.optimizations.enable (
|
||||
myLib.attrsets.mergeAttrsRecursive
|
||||
{
|
||||
KCFLAGS = kCflags;
|
||||
KRUSTFLAGS = kRustflags;
|
||||
}
|
||||
(traceValWithPrefix "aviallon.boot.kernel.addOptimizationAttributes" cfg.kernel.addOptimizationAttributes)
|
||||
)
|
||||
|
|
@ -282,7 +289,6 @@ in {
|
|||
++ optional cfg.removeKernelDRM customKernelPatches.removeKernelDRM
|
||||
;
|
||||
|
||||
|
||||
loader.grub.enable = cfg.useGrub;
|
||||
loader.grub = {
|
||||
device = mkIf cfg.efi "nodev";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue