Skip to content

Commit

Permalink
Fix the clang targets for RISC-V Rust targets
Browse files Browse the repository at this point in the history
  • Loading branch information
David Koloski committed Mar 6, 2024
1 parent 328f8d8 commit cd3cec4
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1985,10 +1985,35 @@ impl Build {
cmd.args.push(
format!("--target={}", target.replace("riscv64gc", "riscv64")).into(),
);
} else if target.starts_with("riscv64imac-") {
cmd.args.push(
format!("--target={}", target.replace("riscv64imac", "riscv64")).into(),
);
} else if target.starts_with("riscv32gc-") {
cmd.args.push(
format!("--target={}", target.replace("riscv32gc", "riscv32")).into(),
);
} else if target.starts_with("riscv32i-") {
cmd.args.push(
format!("--target={}", target.replace("riscv32i", "riscv32")).into(),
)
} else if target.starts_with("riscv32im-") {
cmd.args.push(
format!("--target={}", target.replace("riscv32im", "riscv32")).into(),
)
} else if target.starts_with("riscv32imc-") {
cmd.args.push(
format!("--target={}", target.replace("riscv32imc", "riscv32")).into(),
)
} else if target.starts_with("riscv32imac-") {
cmd.args.push(
format!("--target={}", target.replace("riscv32imac", "riscv32")).into(),
)
} else if target.starts_with("riscv32imafc-") {
cmd.args.push(
format!("--target={}", target.replace("riscv32imafc", "riscv32"))
.into(),
)
} else if target.contains("uefi") {
if target.contains("x86_64") {
cmd.args.push("--target=x86_64-unknown-windows-gnu".into());
Expand Down

0 comments on commit cd3cec4

Please sign in to comment.