//! moana 内核构建脚本
use moa_target_define::{KERNEL_AARCH64, KERNEL_RISCV64};

const ARCH_CFGS: &[(&str, &str)] =
    &[(KERNEL_AARCH64, "aarch64_moana"), (KERNEL_RISCV64, "riscv64_moana")];

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");
}
