diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b7ea88e..6f6f56f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,6 +27,9 @@ variables: - cargohome - target/ key: "build_cache-$TARGET-release" + variables: + CARGO_PROFILE_RELEASE_LTO=true + CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 before_script: - 'echo "Building for target $TARGET"' - 'mkdir -p cargohome && CARGOHOME="cargohome"' diff --git a/Cargo.toml b/Cargo.toml index d28e0b7..f80763e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -124,16 +124,15 @@ lto = 'thin' incremental = true [profile.release] -lto = true +lto = 'thin' incremental = true -codegen-units = 1 + +codegen-units=32 # If you want to make flamegraphs, enable debug info: # debug = true # For releases also try to max optimizations for dependencies: [profile.release.build-override] opt-level = 3 -codegen-units = 1 [profile.release.package."*"] opt-level = 3 -codegen-units = 1