Rollup merge of #125346 - tbu-:pr_rm_path_to_str, r=wesleywiser
Remove some `Path::to_str` from `rustc_codegen_llvm` Unnecessary panic paths when there's a better option.
This commit is contained in:
commit
63fa01eb09
@ -200,21 +200,20 @@ impl ArchiveBuilderBuilder for LlvmArchiveBuilderBuilder {
|
|||||||
_ => panic!("unsupported arch {}", sess.target.arch),
|
_ => panic!("unsupported arch {}", sess.target.arch),
|
||||||
};
|
};
|
||||||
let mut dlltool_cmd = std::process::Command::new(&dlltool);
|
let mut dlltool_cmd = std::process::Command::new(&dlltool);
|
||||||
dlltool_cmd.args([
|
dlltool_cmd
|
||||||
"-d",
|
.arg("-d")
|
||||||
def_file_path.to_str().unwrap(),
|
.arg(def_file_path)
|
||||||
"-D",
|
.arg("-D")
|
||||||
lib_name,
|
.arg(lib_name)
|
||||||
"-l",
|
.arg("-l")
|
||||||
output_path.to_str().unwrap(),
|
.arg(&output_path)
|
||||||
"-m",
|
.arg("-m")
|
||||||
dlltool_target_arch,
|
.arg(dlltool_target_arch)
|
||||||
"-f",
|
.arg("-f")
|
||||||
dlltool_target_bitness,
|
.arg(dlltool_target_bitness)
|
||||||
"--no-leading-underscore",
|
.arg("--no-leading-underscore")
|
||||||
"--temp-prefix",
|
.arg("--temp-prefix")
|
||||||
temp_prefix.to_str().unwrap(),
|
.arg(temp_prefix);
|
||||||
]);
|
|
||||||
|
|
||||||
match dlltool_cmd.output() {
|
match dlltool_cmd.output() {
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user