Index: lib/Driver/ToolChains/MSVC.cpp =================================================================== --- lib/Driver/ToolChains/MSVC.cpp +++ lib/Driver/ToolChains/MSVC.cpp @@ -488,8 +488,10 @@ // their own link.exe which may come first. linkPath = FindVisualStudioExecutable(TC, "link.exe"); - if (!TC.FoundMSVCInstall() && !llvm::sys::fs::can_execute(linkPath)) + if (!TC.FoundMSVCInstall() && !llvm::sys::fs::can_execute(linkPath)) { C.getDriver().Diag(clang::diag::warn_drv_msvc_not_found); + linkPath = TC.GetProgramPath("link.exe"); + } #ifdef _WIN32 // When cross-compiling with VS2017 or newer, link.exe expects to have