Skip to content

Commit e8e6dd5

Browse files
blackheavensupersven
authored andcommitted
Hack flake to ensure x86-64-v3
The important bit is it -v3, it ensures AVX levels supported by customers' machines.
1 parent e171f4c commit e8e6dd5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

flake.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@
9999
(import ./nix/overlay.nix)
100100
(import ./nix/overlay-docs.nix)
101101
];
102+
# Target x86-64-v3 microarchitecture only on x86_64 systems
103+
config = nixpkgs.lib.optionalAttrs (nixpkgs.lib.hasPrefix "x86_64-" system) {
104+
replaceStdenv = { pkgs }: pkgs.stdenvAdapters.withCFlags [ "-march=x86-64-v3" ] pkgs.stdenv;
105+
};
102106
};
103107
pkgs_24_11 = import nixpkgs_24_11 {
104108
inherit system;

0 commit comments

Comments
 (0)