Skip to content

Use custom profiles to set LTO and such #6226

Description

@matklad

Rust 1.57 stabilized custom profiles feature of cargo:

rust-lang/cargo#9943

That means that we can switch from using env variables for LTO

nearcore/Makefile

Lines 1 to 2 in d1d4559

export CARGO_PROFILE_RELEASE_CODEGEN_UNITS = 1
export CARGO_PROFILE_RELEASE_LTO = fat

to using a proper --profile production

Steps here:

  • Add custom profile to root Cargo.toml
  • Search all the places that currently set CARGO_PROFILE_RELEASE_LTO (makefile, estimator, maybe something else?)
  • Update them all to pass --profile production instead.

Metadata

Metadata

Assignees

Labels

A-buildArea: Anything related to the build and configuration process for nearcore.NodeNode teamT-nodeTeam: issues relevant to the node experience team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions