Skip to content

Commit

Permalink
specify the toolchain for which llvm-tools is to be installed
Browse files Browse the repository at this point in the history
If the user is in a project with a different toolchain than the one rftrace is being built with, the component install without the toolchain argument defaults to the wrong toolchain. This change makes the error message provide the possibly necessary argument.
  • Loading branch information
cagatay-y committed Apr 17, 2024
1 parent 5dae679 commit 8e01b43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rftrace/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ fn binutil(name: &str) -> Result<PathBuf, String> {
let path = llvm_tools::LlvmTools::new()
.map_err(|err| match err {
llvm_tools::Error::NotFound =>
"Could not find llvm-tools component\n\
format!("Could not find llvm-tools component\n\
\n\
Maybe the rustup component `llvm-tools` is missing? Install it through: `rustup component add llvm-tools`".to_string()
Maybe the rustup component `llvm-tools` is missing? Install it through: `rustup component add --toolchain={} llvm-tools`", env!("RUSTUP_TOOLCHAIN")).to_string()
,
err => format!("{err:?}"),
})?
Expand Down

0 comments on commit 8e01b43

Please sign in to comment.