File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -50,10 +50,12 @@ jobs:
50
50
- os : ubuntu-latest
51
51
env :
52
52
TARGET_TRIPLE : aarch64-unknown-linux-gnu
53
- # s390x requires QEMU 6.1 or greater, we could build it from source, but ubuntu 22.04 comes with 6.2 by default
54
53
- os : ubuntu-latest
55
54
env :
56
55
TARGET_TRIPLE : s390x-unknown-linux-gnu
56
+ - os : ubuntu-latest
57
+ env :
58
+ TARGET_TRIPLE : riscv64gc-unknown-linux-gnu
57
59
- os : windows-latest
58
60
env :
59
61
TARGET_TRIPLE : x86_64-pc-windows-msvc
92
94
sudo apt-get update
93
95
sudo apt-get install -y gcc-s390x-linux-gnu qemu-user
94
96
97
+ - name : Install riscv64gc toolchain and qemu
98
+ if : matrix.env.TARGET_TRIPLE == 'riscv64gc-unknown-linux-gnu'
99
+ run : |
100
+ sudo apt-get update
101
+ sudo apt-get install -y gcc-riscv64-linux-gnu qemu-user
102
+
95
103
- name : Prepare dependencies
96
104
run : ./y.sh prepare
97
105
Original file line number Diff line number Diff line change @@ -42,6 +42,16 @@ impl Compiler {
42
42
"/usr/s390x-linux-gnu" . to_owned( ) ,
43
43
] ;
44
44
}
45
+ "riscv64gc-unknown-linux-gnu" => {
46
+ // We are cross-compiling for riscv64. Use the correct linker and run tests in qemu.
47
+ self . rustflags . push ( "-Clinker=riscv64-linux-gnu-gcc" . to_owned ( ) ) ;
48
+ self . rustdocflags . push ( "-Clinker=riscv64-linux-gnu-gcc" . to_owned ( ) ) ;
49
+ self . runner = vec ! [
50
+ "qemu-riscv64" . to_owned( ) ,
51
+ "-L" . to_owned( ) ,
52
+ "/usr/riscv64-linux-gnu" . to_owned( ) ,
53
+ ] ;
54
+ }
45
55
"x86_64-pc-windows-gnu" => {
46
56
// We are cross-compiling for Windows. Run tests in wine.
47
57
self . runner = vec ! [ "wine" . to_owned( ) ] ;
You can’t perform that action at this time.
0 commit comments