build.rs 162 B

123456789
  1. use std::env;
  2. fn main() {
  3. let target = env::var("TARGET").unwrap();
  4. if target.starts_with("riscv") {
  5. println!("cargo:rustc-cfg=riscv");
  6. }
  7. }