Skip to content

Commit b91ceb8

Browse files
committed
use file to write llvm linker script
1 parent 8c9a75b commit b91ceb8

File tree

1 file changed

+2
-1
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+2
-1
lines changed

src/bootstrap/src/core/build_steps/dist.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2046,7 +2046,8 @@ fn install_llvm_file(
20462046
// projects like miri link against librustc_driver.so. We don't use a symlink, as
20472047
// these are not allowed inside rustup components.
20482048
let link = t!(fs::read_link(source));
2049-
t!(std::fs::write(full_dest, format!("INPUT({})\n", link.display())));
2049+
let mut linker_script = t!(fs::File::create(full_dest));
2050+
t!(write!(linker_script, "INPUT({})\n", link.display()));
20502051
}
20512052
} else {
20522053
builder.install(&source, destination, 0o644);

0 commit comments

Comments
 (0)