The logic could be hoisted out, but it would be a little difficult (specifically the error logic in load_library_crate() would need to be moved upwards as well, which would duplicate things). This is because macro_rules! macros can be loaded from either target or host crates, and it seems pointless to require that crates be built for both architectures in that case. There's also a bootstrapping issue here because we don't know the crate triples in stage1 (though this could be fixed).