mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-22 12:30:08 +00:00
Simpler way to allow -march=native on nixOS
This commit is contained in:
parent
9fd4e7405e
commit
1e648b57cc
@ -1,7 +1,8 @@
|
||||
{ pkgs ? import <nixpkgs> { } }: with pkgs;
|
||||
{ pkgs ? import <nixpkgs> {}}:
|
||||
with pkgs;
|
||||
mkShell {
|
||||
|
||||
buildInputs = [
|
||||
llvmPackages_14.clang-unwrapped
|
||||
figlet
|
||||
git
|
||||
gnumake
|
||||
@ -13,10 +14,10 @@ mkShell {
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
# We use clang unwrapped because the compiler wrappers under Nix
|
||||
# ignore -march=native in order to keep the build deterministic
|
||||
export PATH=${llvmPackages_14.clang-unwrapped}/bin:$PATH
|
||||
export CC=clang
|
||||
# By default, the Nix wrapper scripts for executing the system compilers
|
||||
# will erase `-march=native` because this introduces impurity in the build.
|
||||
# For the purposes of compiling Nimbus, this behavior is not desired:
|
||||
export NIX_ENFORCE_NO_NATIVE=0
|
||||
|
||||
figlet "Welcome to Nimbus-eth2"
|
||||
'';
|
||||
|
Loading…
x
Reference in New Issue
Block a user