This is an archive of the discontinued LLVM Phabricator instance.

Windows ToolChain: remove excessive backslash if we find WindowsSDK
Needs ReviewPublic

Authored by akuharev on Apr 21 2014, 7:12 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Previously we had:
clang -cc1 ... double backslash in windowsSDK include

Excessive backslash is returned by function getWindowsSDKDir.
The Windows registry contains Microsoft InstallDir with trailing backslash.

Diff Detail

Event Timeline

I 'm not sure the problem is here. The sys::path::append function knows how to deal with duplicate slashes so if you do get duplicate backslash, plain string concatenation was probably used instead of sys::path::append. In such case the correct bug fix would be to use sys::path::append instead of the string concatenation.

rnk added a subscriber: rnk.Apr 22 2014, 5:24 PM

Thanks for the info, this should be fixed in r206933.

BTW, I recommend not relying on that registry searching code. It's not well
maintained. The best way to make sure you're getting the right VC and SDK
headers is to set INCLUDE in the environment, most likely with
vcvarsall.bat.