diff options
author | Andrew Gallant <jamslam@gmail.com> | 2023-11-27 21:31:03 -0500 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2023-11-27 21:31:03 -0500 |
commit | b6bac8484e5466d332640c4022951061bb865329 (patch) | |
tree | 71f1195027268d9772340a68f133f0e110784381 | |
parent | 805fa32d184f9b163e7355dd335abc96440f0d2b (diff) |
cargo: add release-lto profile
The idea is to build ripgrep with as much optimization as possible.
This makes compilation times absolutely obscene. They jump from <10
seconds to 30+ seconds on my i9-12900K. I don't even want to know how
long CI would take with these.
I tried some ad hoc benchmarks and could not notice any meaningful
improvement with the LTO binary versus the normal release profile.
Because of that, I still don't think it's worth bloating the release
cycle times.
Ref #1225
-rw-r--r-- | Cargo.toml | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -74,6 +74,18 @@ pcre2 = ["grep/pcre2"] [profile.release] debug = 1 +[profile.release-lto] +inherits = "release" +opt-level = 3 +debug = "none" +strip = "symbols" +debug-assertions = false +overflow-checks = false +lto = "fat" +panic = "abort" +incremental = false +codegen-units = 1 + # This is the main way to strip binaries in the deb package created by # 'cargo deb'. For other release binaries, we (currently) call 'strip' # explicitly in the release process. |