Fixes #45687. This is really just a band-aid, our current buildsystem doesn't work well for cross-compilation and needs a thorough refactoring to do so.