[PATCH] Resubmit "Improve Windows toolchain support for non-standard environments."
Hans Wennborg
hans at chromium.org
Wed Oct 22 11:15:16 PDT 2014
================
Comment at: lib/Driver/MSVCToolChain.cpp:218
@@ +217,3 @@
+// system (as reported by the registry).
+bool Windows::getVisualStudioBinariesFolder(const char *clangProgramPath,
+ std::string &path) const {
----------------
The Windows toolchain was renamed to MSVCToolChain in r220362.
================
Comment at: lib/Driver/MSVCToolChain.cpp:225
@@ +224,3 @@
+ // First check the environment variables that vsvars32.bat sets.
+ const char *vcinstalldir = getenv("VCINSTALLDIR");
+ if (vcinstalldir) {
----------------
Should this use llvm::sys::Process::GetEnv like below?
================
Comment at: lib/Driver/MSVCToolChain.cpp:228
@@ +227,3 @@
+ BinDir = vcinstalldir;
+ llvm::sys::path::append(BinDir, "VC");
+ } else {
----------------
Should this append VC\bin ?
When I applied this patch, clang no longer finds link.exe in my VS2012 environment.
VCINSTALLDIR is set to C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\ and link.exe is at C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\link.exe
If I unset VSINSTALLDIR it seems to work due to the PATH walking below.
http://reviews.llvm.org/D5892
More information about the cfe-commits
mailing list