chore(cargo): always enable LTO in release mode
MODIFY
.cargo/config.toml
.cargo/config.toml
@@ -24,3 +24,6 @@ bench_analyzer = "run -p xtask_bench --release -- --feature analyzer"
coverage = "run -p xtask_coverage --profile=release-with-debug --"
rome-cli = "run -p rome_cli --release --"
rome-cli-dev = "run -p rome_cli --"
+
+[profile.release]
+lto = true

MODIFY
.github/workflows/release_cli.yml
.github/workflows/release_cli.yml
@@ -118,8 +118,6 @@ jobs:
run: cargo build -p rome_cli --release --target ${{ matrix.target }}
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
- # Perform full Link-Time Optimizations
- CARGO_PROFILE_RELEASE_LTO: "true"
# Strip all debug symbols from the resulting binaries
RUSTFLAGS: "-C strip=symbols"
# Inline the version of the npm package in the CLI binary

MODIFY
.github/workflows/release_lsp.yml
.github/workflows/release_lsp.yml
@@ -105,8 +105,6 @@ jobs:
run: cargo build -p rome_lsp --release --target ${{ matrix.target }}
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
- # Perform full Link-Time Optimizations
- CARGO_PROFILE_RELEASE_LTO: "true"
# Strip all debug symbols from the resulting binaries
RUSTFLAGS: "-C strip=symbols"

chore(cargo): always enable LTO in release mode (#2950)