Skip to content

Commit

Permalink
[Cargo] Use new dist profile with fat LTO for release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
m4heshd committed Apr 19, 2024
1 parent f066a0d commit 5b53ce7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
rustflags = ["-C", "target-feature=+crt-static"]

[alias]
build-win32 = 'build --release --package ufc-ripper --features=exe_res'
build-linux = 'build --release --package ufc-ripper'
build-win32 = 'build --profile dist --package ufc-ripper --features=exe_res'
build-linux = 'build --profile dist --package ufc-ripper'
pack-win32 = 'run --release --package pack -- --platform win32'
pack-linux = 'run --release --package pack -- --platform linux'
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ license = "MIT"
repository = "https://github.com/m4heshd/ufc-ripper"
edition = "2021"
publish = false

[profile.dist]
inherits = "release"
lto = "fat"
4 changes: 2 additions & 2 deletions pack/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ fn main() -> anyhow::Result<()> {
let cli_args = CLIArgs::parse();
let platform = cli_args.platform.as_str();
let bin_path = if platform == "win32" {
"target/release/ufc-ripper.exe"
"target/dist/ufc-ripper.exe"
} else if platform == "linux" {
"target/release/ufc-ripper"
"target/dist/ufc-ripper"
} else {
log_err!("This platform is not supported\n");
panic!();
Expand Down

0 comments on commit 5b53ce7

Please sign in to comment.