Skip to content

Commit

Permalink
Use riscv64-unknown-linux-gnu for target on clang. (#608)
Browse files Browse the repository at this point in the history
  • Loading branch information
makotokato committed Jun 9, 2021
1 parent b63f824 commit 19320dd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cc-test/src/riscv64gc.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.globl asm
asm:
li a0, 7
ret

.globl _asm
_asm:
li a0, 7
ret
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1484,6 +1484,10 @@ impl Build {
.into(),
);
}
} else if target.starts_with("riscv64gc-") {
cmd.args.push(
format!("--target={}", target.replace("riscv64gc", "riscv64")).into(),
);
} else {
cmd.args.push(format!("--target={}", target).into());
}
Expand Down

0 comments on commit 19320dd

Please sign in to comment.