fn include_a_files(out_dir: &str) {
    let target = env::var("TARGET").expect(MISSING_CARGO_ENV);
    let out_dir = PathBuf::from(out_dir);
    let name = env::var("CARGO_PKG_NAME").expect(MISSING_CARGO_ENV);

    if &target == "riscv32imc-unknown-none-elf" {
        fs::copy(
            format!("bin/{}.a", target),
            out_dir.join(format!("lib{}.a", name)),
        )
        .unwrap();

        println!("cargo:rustc-link-lib=static={}", name);
        println!("cargo:rustc-link-search={}", out_dir.display());
        println!("cargo:rerun-if-changed=bin/{}.a", target);
    }
}
/// Include `.a` files generated by assembly codes
Include `.a` files generated by assembly codes
Include ` . a ` files generated by assembly codes
fn include_a_files(out_dir: &str) {
    let target = env::var("TARGET").expect(MISSING_CARGO_ENV);
    let out_dir = PathBuf::from(out_dir);
    let name = env::var("CARGO_PKG_NAME").expect(MISSING_CARGO_ENV);
    if &target == "riscv32imc-unknown-none-elf" {
        fs::copy(
            format!("bin/{}.a", target),
            out_dir.join(format!("lib{}.a", name)),
        )
        .unwrap();
        println!("cargo:rustc-link-lib=static={}", name);
        println!("cargo:rustc-link-search={}", out_dir.display());
        println!("cargo:rerun-if-changed=bin/{}.a", target);
    }
}
fn include_a_files ( out_dir : & str ) { let target = env :: var ( " " ) . expect ( MISSING_CARGO_ENV ) ; let out_dir = PathBuf :: from ( out_dir ) ; let name = env :: var ( " " ) . expect ( MISSING_CARGO_ENV ) ; if & target == " " { fs :: copy ( format ! ( " " target ) , out_dir . join ( format ! ( " " name ) ) , ) . unwrap ( ) ; println ! ( " " name ) ; println ! ( " " out_dir display ( ) ) ; println ! ( " " target ) ; } }
Include `.a` files generated by assembly codes
Include ` . a ` files generated by assembly codes
out_dir
&str
out_dir
&str