diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2022-05-11 15:47:03 +0200 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2022-05-19 09:58:06 +0200 |
commit | 8d2b8d0da3814e7cec25fb31292e4ade6981cb7d (patch) | |
tree | f544689334947cfacf61890cca51d377068345e2 /pkgs/applications/blockchains | |
parent | bd41737ab4b4f26ade987b95679df8955dc37402 (diff) |
nearcore: switch to fat lto
Diffstat (limited to 'pkgs/applications/blockchains')
-rw-r--r-- | pkgs/applications/blockchains/nearcore/default.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/applications/blockchains/nearcore/default.nix b/pkgs/applications/blockchains/nearcore/default.nix index 09d4546356c2e..a5f9368b3771c 100644 --- a/pkgs/applications/blockchains/nearcore/default.nix +++ b/pkgs/applications/blockchains/nearcore/default.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { ''; CARGO_PROFILE_RELEASE_CODEGEN_UNITS = "1"; - CARGO_PROFILE_RELEASE_LTO = "thin"; + CARGO_PROFILE_RELEASE_LTO = "fat"; NEAR_RELEASE_BUILD = "release"; OPENSSL_NO_VENDOR = 1; # we want to link to OpenSSL provided by Nix @@ -42,6 +42,9 @@ rustPlatform.buildRustPackage rec { protobuf ]; + # fat LTO requires ~3.4GB RAM + requiredSystemFeatures = [ "big-parallel" ]; + LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; BINDGEN_EXTRA_CLANG_ARGS = "-isystem ${llvmPackages.libclang.lib}/lib/clang/${lib.getVersion llvmPackages.clang}/include"; |