Auto merge of #43842 - bjorn3:no_llvm_cleanup, r=alexcrichton
Cleanup for "Support compiling rustc without LLVM (try 2)"
This includes a small patch to allow running tests without llvm. Also check if you are not trying to compile a dylib.
cc #42932
r? @alexcrichton