mirror of
https://github.com/xddxdd/nix-cachyos-kernel.git
synced 2026-07-03 19:18:07 +02:00
Set impureUseNativeOptimizations if native kernel is requested
This commit is contained in:
parent
52b98fc4da
commit
359d765c4d
@ -6,6 +6,7 @@
|
|||||||
stdenv,
|
stdenv,
|
||||||
kernelPatches,
|
kernelPatches,
|
||||||
applyPatches,
|
applyPatches,
|
||||||
|
impureUseNativeOptimizations,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.makeOverridable (
|
lib.makeOverridable (
|
||||||
@ -147,7 +148,12 @@ lib.makeOverridable (
|
|||||||
// {
|
// {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
src = patchedSrc;
|
src = patchedSrc;
|
||||||
stdenv = args.stdenv or (if lto == "none" then stdenv else stdenvLLVM);
|
|
||||||
|
stdenv =
|
||||||
|
# Apply native optimization on top of stdenv if requested
|
||||||
|
(if processorOpt == "native" then impureUseNativeOptimizations else lib.id)
|
||||||
|
# Select stdenv/stdenvLLVM based on requested compiler
|
||||||
|
(args.stdenv or (if lto == "none" then stdenv else stdenvLLVM));
|
||||||
|
|
||||||
extraMakeFlags = (lib.optionals (lto != "none") ltoMakeflags) ++ (args.extraMakeFlags or [ ]);
|
extraMakeFlags = (lib.optionals (lto != "none") ltoMakeflags) ++ (args.extraMakeFlags or [ ]);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user