Skip to content

Commit adf7ed9

Browse files
authored
Merge pull request #2785 from reubenmiller/fix-riscv-libc-dep
fix(riscv): building using Rust 1.73 to avoid segmentation fault in release mode
2 parents a5671dc + 44abd79 commit adf7ed9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/build-workflow.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ jobs:
5454
- armv5te-unknown-linux-musleabi
5555
- x86_64-unknown-linux-musl
5656
- i686-unknown-linux-musl
57-
- riscv64gc-unknown-linux-gnu
5857
- x86_64-apple-darwin
5958
mode:
6059
- --release
@@ -91,6 +90,13 @@ jobs:
9190
cargo_options: --no-run
9291

9392
- target: riscv64gc-unknown-linux-gnu
93+
mode: '--release'
94+
# Using < 1.73 causes a segmentation fault when running a binary built with the --release flag
95+
# Rust 1.73 includes both an updated llvm version and updated binutils which is like to have improved compatibility
96+
# See: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1730-2023-10-05
97+
# There is a comment in the https://github.com/rust-lang/rust/pull/114048/ which refers to riscv64 support:
98+
# * "Updated dist-riscv64-linux to use binutils 2.36 in order to recognize the zicsr feature, which is no longer part of the base ISA."
99+
rust_channel: "1.73"
94100
host_os: ubuntu-22.04
95101
cargo_options: --no-run
96102

0 commit comments

Comments
 (0)