dmajor created this revision. Herald added subscribers: kristof.beyls, aemerson.
Mozilla's build machines are currently applying this patch locally, but I thought I'd offer it upstream because it should be pretty harmless. clang-cl has some sanity checks to make sure that the cl.exe it finds is actually the Microsoft compiler and not something else. The code expects the path to look like: ...\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\cl.exe It doesn't work on Mozilla's build automation where we have a fake Visual Studio installation that looks like: c:\vs2017\VC\bin\HostX64\x64\cl.exe This patch reduces the path requirement to `...\bin\Host*\*\cl.exe`. https://reviews.llvm.org/D39994 Files: lib/Driver/ToolChains/MSVC.cpp Index: lib/Driver/ToolChains/MSVC.cpp =================================================================== --- lib/Driver/ToolChains/MSVC.cpp +++ lib/Driver/ToolChains/MSVC.cpp @@ -152,8 +152,7 @@ // path components with these prefixes when walking backwards through // the path. // Note: empty strings match anything. - llvm::StringRef ExpectedPrefixes[] = {"", "Host", "bin", "", - "MSVC", "Tools", "VC"}; + llvm::StringRef ExpectedPrefixes[] = {"", "Host", "bin"}; auto It = llvm::sys::path::rbegin(PathEntry); auto End = llvm::sys::path::rend(PathEntry);
Index: lib/Driver/ToolChains/MSVC.cpp =================================================================== --- lib/Driver/ToolChains/MSVC.cpp +++ lib/Driver/ToolChains/MSVC.cpp @@ -152,8 +152,7 @@ // path components with these prefixes when walking backwards through // the path. // Note: empty strings match anything. - llvm::StringRef ExpectedPrefixes[] = {"", "Host", "bin", "", - "MSVC", "Tools", "VC"}; + llvm::StringRef ExpectedPrefixes[] = {"", "Host", "bin"}; auto It = llvm::sys::path::rbegin(PathEntry); auto End = llvm::sys::path::rend(PathEntry);
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits