Skip to content

Commit

Permalink
explicity on riscv64 march (#57)
Browse files Browse the repository at this point in the history
Gcc require explicity on ISA subset
```
cargo:warning=gcc: error: '-march=rv64': first ISA subset must be 'e', 'i' or 'g'
```
Ref: https://gitlab.alpinelinux.org/mengzhuo/aports/-/jobs/1630520
  • Loading branch information
mengzhuo authored Jan 7, 2025
1 parent 53cc45e commit 5ac408b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lz4-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ fn run() -> Result<(), Box<dyn Error>> {
.opt_level(3);

let target = get_from_env("TARGET")?;
if target.contains("riscv64") {
// riscv64 require explict on G/I/E
compiler.flag("-march=rv64g");
}
if target.contains("windows") {
if target == "i686-pc-windows-gnu" {
// Disable auto-vectorization for 32-bit MinGW target.
Expand Down

0 comments on commit 5ac408b

Please sign in to comment.