Skip to content

Commit

Permalink
Use llvm-as bundles with rustc as assembler
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Oct 7, 2023
1 parent b49a0ae commit 0e018d1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 31 deletions.
14 changes: 13 additions & 1 deletion src/global_asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,19 @@ impl GlobalAsmConfig {

GlobalAsmConfig {
asm_enabled,
assembler: crate::toolchain::get_toolchain_binary(tcx.sess, "as"),
assembler: rustc_session::filesearch::sysroot_candidates()
.into_iter()
.map(|sysroot| {
sysroot
.join(rustc_target::target_rustlib_path(
&sysroot,
&rustc_session::config::host_triple(),
))
.join("bin")
.join("llvm-as")
})
.find(|path| path.exists())
.expect("no llvm-as"), // TODO nicer error
output_filenames: tcx.output_filenames(()).clone(),
}
}
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ mod num;
mod optimize;
mod pointer;
mod pretty_clif;
mod toolchain;
mod trap;
mod unsize;
mod value_and_place;
Expand Down
29 changes: 0 additions & 29 deletions src/toolchain.rs

This file was deleted.

0 comments on commit 0e018d1

Please sign in to comment.