Skip to content

Commit d94a842

Browse files
committed
Pass -Cembed-bitcode=yes instead of -Clinker-plugin-lto for sysroot build
This is the same approach that rustc bootstrap uses: https://github.com/rust-lang/rust/blob/a2e0b48e6eef854521d3199ee9e327aab298f071/src/bootstrap/compile.rs#L235-L245
1 parent 9a37293 commit d94a842

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sysroot.rs

+1-1
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("RUSTFLAGS", "-Clinker-plugin-lto");
87+
cmd.env("RUSTFLAGS", "-Cembed-bitcode=yes");
8888
cmd.env("CARGO_TARGET_DIR", &target_dir);
8989
cmd.env("__CARGO_DEFAULT_LIB_METADATA", "XARGO");
9090

0 commit comments

Comments
 (0)