Skip to content

Commit

Permalink
override lto setting
Browse files Browse the repository at this point in the history
cargo-show-asm relies on --emit to tell it which file was generated,
In rustc past rust-lang/rust#103610 this no
longer works even with -Ccodegen-units=1

This should not affect c-s-a's output since it wasn't looking at
linker's optimization but might affect how compiled program performs.
  • Loading branch information
pacak committed Mar 9, 2023
1 parent 0036c93 commit d87bca9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ fn spawn_cargo(
.args(["--emit", syntax.emit()])
// So only one file gets created.
.arg("-Ccodegen-units=1")
.arg("-Clto=no")
.args(syntax.format().iter().flat_map(|s| ["-C", s]))
.args(target_cpu.iter().map(|cpu| format!("-Ctarget-cpu={cpu}")));

Expand Down

0 comments on commit d87bca9

Please sign in to comment.