Linking taking an inordinately long time

You can set rustflags in a .cargo/config file either per-project or globally (in your home directory or some other common ancestor directory of all your projects). Though there may be some issues with rustflags set in one config file being overridden by another, if you have them at multiple levels of the directory tree.