, cfg!, cross compilation

I was wondering if anyone had written a crate which emulates the cfg!
macro behavior, but specifically for 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.

To follow up on this question,

I went ahead and built something, which was then further refined by
pkw, resulting in the tectonic_cfg_support crate, it has a target_cfg! macro which emulates some of the behavior of cfg! for this situation.

Not all cfg! macro invocations are supported by the target_cfg! macro for example,
cfg!(not(any(all(...), all(...)))),

however it does support e.g. target_cfg!(not(all(...))) as in the original query.

hope it helps.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.