I turns out that in macro generation target == host, as in build scripts. It turns out that build scripts can get target information out of environment variables, but they don't seem to be set for macro generation.
Does anyone know a way of getting target info during macro generation?
I would prefer not to have to output the check in the generated code, cause there will be quite some bloat.