From d87bca9f831de0c02acfc2a9c0b0330b1dd5a66f Mon Sep 17 00:00:00 2001 From: Michael Baikov Date: Thu, 9 Mar 2023 08:06:51 -0500 Subject: [PATCH] override lto setting cargo-show-asm relies on --emit to tell it which file was generated, In rustc past https://github.com/rust-lang/rust/pull/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. --- src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.rs b/src/main.rs index 84ae5a3..1853c44 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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}")));