|
@@ -14,15 +14,10 @@ fn main() {
|
|
|
if target.starts_with("riscv") {
|
|
|
let mut target = Target::from_target_str(&target);
|
|
|
target.retain_extensions("imfdc");
|
|
|
+ let archive = format!("bin/{}.a", target.to_string());
|
|
|
|
|
|
- let target = target.to_string();
|
|
|
-
|
|
|
- fs::copy(
|
|
|
- format!("bin/{}.a", target),
|
|
|
- out_dir.join(format!("lib{}.a", name)),
|
|
|
- )
|
|
|
- .unwrap();
|
|
|
-
|
|
|
+ fs::copy(&archive, out_dir.join(format!("lib{}.a", name))).unwrap();
|
|
|
+ println!("cargo:rerun-if-changed={}", archive);
|
|
|
println!("cargo:rustc-link-lib=static={}", name);
|
|
|
}
|
|
|
|