[llvm-bugs] [Bug 35105] New: Clang-cl detection of Visual Studio version (VS2017)
llvm-bugs at lists.llvm.org
Fri Oct 27 02:12:33 PDT 2017
Bug ID: 35105
Summary: Clang-cl detection of Visual Studio version (VS2017)
OS: Windows NT
Assignee: unassignedclangbugs at nondot.org
Reporter: alastair at transfinite.com
CC: llvm-bugs at lists.llvm.org
When compiling with Clang within VS2017 I am not seeing the version of VS
detected correctly which is causing issues when using /fallback as the path to
cl.exe isn't set correctly.
Looking at FindVCToolChainViaEnvironment(VCToolChainPath, VSLayout)
It first looks for "VCToolsInstallDir" - this environment variable is not set
if you simply launch VS2017
- Note: %WindowsSdkDir% and %VCToolsInstallDir% are not set as global
environment variables so make sure you start devenv.exe from a “Developer
Command Prompt for VS 2017” that defines these variables)
It then looks for VCINSTALLDIR which if found it assumes VSLayout =
MSVCToolChain::ToolsetLayout::OlderVS; and problems ensue.
Issue is my Visual Assist plugin is seemingly setting this environment variable
to c:\program files (x86)\microsoft visual
studio\2017\professional\common7\ide\vc\ on my system.
Disable this plugin and all works as expected (VCINSTALLDIR is not set) as then
findVCToolChainViaSetupConfig correctly detects VS2017.
I am not sure Visual Assist should be setting this enviroment variable but it
would seem to be sensible given VCToolChainViaSetupConfig states "This is the
preferred way to discover new Visual Studios, as they're no longer listed in
the registry" that is function call is possibly called first in
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs