]> granicus.if.org Git - clang/commit
Improve Windows toolchain support for non-standard environments.
authorZachary Turner <zturner@google.com>
Mon, 20 Oct 2014 20:08:04 +0000 (20:08 +0000)
committerZachary Turner <zturner@google.com>
Mon, 20 Oct 2014 20:08:04 +0000 (20:08 +0000)
commit4da58c93c5800e668ba7cd469adb27bd1f667736
tree4d6df097fb8722f0d9337dc9cc6bb0b252fbc023
parentae27cbde0f5e3fc8fb77e5a421a20f0eab05e9fb
Improve Windows toolchain support for non-standard environments.

Typically clang finds Visual Studio by the user explicitly setting
up a Visual Studio environment via vcvarsall.  But we still try to
behave intelligently and fallback to different methods of finding
Visual Studio when this is not done.  This patch improves various
fallback codepaths to make Visual Studio locating more robust.

Specifically, this patch:

* Adds support for searching environment variables for VS 12.0
* Correctly locates include folders for Windows SDK 8.x (this was
  previously broken, and would cause clang to error)
* Prefers locating link.exe in the same location as cl.exe.  This
  is helpful in case another link.exe is in the path earlier than
  Visual Studio (e.g. GnuWin32)
* Minor cleanup in the registry reading code to make it more
  robust in the presence of long pathnames.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220226 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/ToolChains.h
lib/Driver/Tools.cpp
lib/Driver/WindowsToolChain.cpp