Skip to content

Commit 19320dd

Browse files
authored
Use riscv64-unknown-linux-gnu for target on clang. (#608)
1 parent b63f824 commit 19320dd

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

cc-test/src/riscv64gc.S

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.globl asm
2+
asm:
3+
li a0, 7
4+
ret
5+
6+
.globl _asm
7+
_asm:
8+
li a0, 7
9+
ret

src/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1484,6 +1484,10 @@ impl Build {
14841484
.into(),
14851485
);
14861486
}
1487+
} else if target.starts_with("riscv64gc-") {
1488+
cmd.args.push(
1489+
format!("--target={}", target.replace("riscv64gc", "riscv64")).into(),
1490+
);
14871491
} else {
14881492
cmd.args.push(format!("--target={}", target).into());
14891493
}

0 commit comments

Comments
 (0)