Skip to content

Commit

Permalink
use file to write llvm linker script
Browse files Browse the repository at this point in the history
  • Loading branch information
lqd committed Mar 7, 2024
1 parent 8c9a75b commit b91ceb8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bootstrap/src/core/build_steps/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2046,7 +2046,8 @@ fn install_llvm_file(
// projects like miri link against librustc_driver.so. We don't use a symlink, as
// these are not allowed inside rustup components.
let link = t!(fs::read_link(source));
t!(std::fs::write(full_dest, format!("INPUT({})\n", link.display())));
let mut linker_script = t!(fs::File::create(full_dest));
t!(write!(linker_script, "INPUT({})\n", link.display()));
}
} else {
builder.install(&source, destination, 0o644);
Expand Down

0 comments on commit b91ceb8

Please sign in to comment.