mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[Lib/Optimizations] fix wrong values used for GCC cache parameters
This commit is contained in:
parent
e593e970a3
commit
317ea5cff0
1 changed files with 5 additions and 3 deletions
|
|
@ -183,10 +183,10 @@ let
|
|||
attrByPath [ march ] { } _map;
|
||||
|
||||
|
||||
cacheTuning = { compiler, l1i ? null, l1Line ? null, lastLevel ? null }:
|
||||
cacheTuning = { compiler, l1d ? null, l1i ? null, l1Line ? null, lastLevel ? null }:
|
||||
if compiler == "gcc" then [ ]
|
||||
++ optional (! isNull l1i) "--param l1-cache-size=${toString l1i}"
|
||||
++ optional (! isNull l1Line) "--param l1-cache-line-size=${toString l1i}"
|
||||
++ optional (! isNull l1d) "--param l1-cache-size=${toString l1d}"
|
||||
++ optional (! isNull l1Line) "--param l1-cache-line-size=${toString l1Line}"
|
||||
++ optional (! isNull lastLevel) "--param l2-cache-size=${toString lastLevel}"
|
||||
else
|
||||
[ ];
|
||||
|
|
@ -333,6 +333,7 @@ rec {
|
|||
, ninja ? false
|
||||
, l1LineCache ? null
|
||||
, l1iCache ? null
|
||||
, l1dCache ? null
|
||||
, lastLevelCache ? null
|
||||
, ...
|
||||
}:
|
||||
|
|
@ -366,6 +367,7 @@ rec {
|
|||
inherit compiler;
|
||||
l1Line = l1LineCache;
|
||||
l1i = l1iCache;
|
||||
l1d = l1dCache;
|
||||
lastLevel = lastLevelCache;
|
||||
});
|
||||
CXXFLAGS = CFLAGS;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue