Skip to content

Commit 911bfeb

Browse files
committed
Set -Clinker-plugin-lto for the sysroot build
1 parent f092476 commit 911bfeb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sysroot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ fn build_crate(
8484

8585
let cargo = std::env::var("CARGO").unwrap_or("cargo".to_string());
8686
let mut cmd = Command::new(cargo);
87-
cmd.env_remove("RUSTFLAGS");
87+
cmd.env("RUSTFLAGS", "-Clinker-plugin-lto");
8888
cmd.env("CARGO_TARGET_DIR", &target_dir);
8989
cmd.env("__CARGO_DEFAULT_LIB_METADATA", "XARGO");
9090

0 commit comments

Comments
 (0)