//! `moana_std` 用户态构建脚本
use moa_target_define::{USER_AARCH64, USER_RISCV64};

const ARCH_CFGS: &[(&str, &str)] =
    &[(USER_AARCH64, "aarch64_moana_std"), (USER_RISCV64, "riscv64_moana_std")];

fn main() {
    let target = std::env::var("TARGET").unwrap();
    for (triple, cfg) in ARCH_CFGS {
        println!("cargo::rustc-check-cfg=cfg({cfg})");
        if *triple == target {
            println!("cargo::rustc-cfg={cfg}");
        }
    }
    println!("cargo::rerun-if-changed=build.rs");
}
