Running in a vcvars.bat shell environment should make this work without
changing clang.
Clang only checks these hardcoded paths when the INCLUDE variable isn't
set. This code in clang/lib/Driver/MSVCToolChain.cpp needs work to deal
with the Windows 10 SDK:
if (getWindowsSDKDir(WindowsSDKDir, major, minor)) {
if (major >= 8) {
AddSystemIncludeWithSubfolder(DriverArgs, CC1Args, WindowsSDKDir,
"include\\shared");
AddSystemIncludeWithSubfolder(DriverArgs, CC1Args, WindowsSDKDir,
"include\\um");
AddSystemIncludeWithSubfolder(DriverArgs, CC1Args, WindowsSDKDir,
"include\\winrt");
} else {
AddSystemIncludeWithSubfolder(DriverArgs, CC1Args, WindowsSDKDir,
"include");
}
} else {
If you can easily test changes to this code, a patch would be welcome.
On Wed, Aug 5, 2015 at 10:34 PM, Rexdf via llvm-dev <llvm-dev at
lists.llvm.org> wrote:
> >clang -v -E -x c++ -
> clang version 3.8.0 (trunk 243961)
> Target: x86_64-pc-windows-msvc
> Thread model: posix
> "C:\\llvim3.8.0\\bin\\clang.exe" -cc1 -triple
> x86_64-pc-windows-msvc18.0.0 -E -disable-free -disable-llvm-verifier
> -main-file-name - -mrelocation-model pic -pic-level 2 -mthread
> -model posix -fmath-errno -masm-verbose -mconstructor-aliases
> -munwind-tables -target-cpu x86-64 -momit-leaf-frame-pointer -v
> -dwarf-column-info -resource-dir "C:\\llvim3.8.0\\bi
> n\\..\\lib\\clang\\3.8.0" -internal-isystem
> "C:\\llvim3.8.0\\bin\\..\\lib\\clang\\3.8.0\\include"
> -internal-isystem "C:\\Program Files (x86)\\Microsoft Visual Studio
> 14.0\\VC\\in
> clude" -internal-isystem "C:\\Program Files (x86)\\Windows
> Kits\\10\\include\\shared" -internal-isystem "C:\\Program Files
> (x86)\\Windows Kits\\10\\include\\um" -internal-isystem
"C:\\Progr
> am Files (x86)\\Windows Kits\\10\\include\\winrt" -fdeprecated-macro
> -fdebug-compilation-dir "C:\\llvim3.8.0\\bin" -ferror-limit 19
> -fmessage-length 189 -mstackrealign -fms-exten
> sions -fms-compatibility -fms-compatibility-version=18 -std=c++11
> -fno-threadsafe-statics -fdelayed-template-parsing -fobjc-runtime=gcc
> -fdiagnostics-show-option -fcolor-diagnostics -o - -x
> c++ -
> clang -cc1 version 3.8.0 based upon LLVM 3.8.0svn default target
> x86_64-pc-windows-msvc
> ignoring nonexistent directory "C:\Program Files (x86)\Windows
> Kits\10\include\shared"
> ignoring nonexistent directory "C:\Program Files (x86)\Windows
> Kits\10\include\um"
> ignoring nonexistent directory "C:\Program Files (x86)\Windows
> Kits\10\include\winrt"
> #include "..." search starts here:
> #include <...> search starts here:
> C:\llvim3.8.0\bin\..\lib\clang\3.8.0\include
> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include
> End of search list.
>
> It should be `C:\Program Files (x86)\Windows
> Kits\10\Include\10.0.10240.0\shared` etc.
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org http://llvm.cs.uiuc.edu
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20150806/238be70e/attachment.html>