Index: lib/Driver/WindowsToolChain.cpp =================================================================== --- lib/Driver/WindowsToolChain.cpp +++ lib/Driver/WindowsToolChain.cpp @@ -196,6 +196,9 @@ sizeof(windowsSDKInstallDir) - 1); // If we have both vc80 and vc90, pick version we were compiled with. if (hasSDKDir && windowsSDKInstallDir[0]) { + char *p = windowsSDKInstallDir + strlen(windowsSDKInstallDir) - 1; + if (*p == '\\') + *p = '\0'; path = windowsSDKInstallDir; return true; }