Build.rs, cfg!, cross compilation

I was wondering if anyone had written a crate which emulates the cfg!
macro behavior, but specifically for build.rs and the CARGO_CFG_TARGET_... environment variables.

so that one could easily switch from:
#[cfg!(not(all(target_os = "cathederal", target_arch="gothic")))]

into e.g. build_cfg!(...), I looked around but didn't find anything.