[PATCH] D48886: VS 2017 clang integration

David Tarditi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 3 10:37:13 PDT 2018


dtarditi created this revision.
dtarditi added a reviewer: hans.
Herald added subscribers: delcypher, mgorny.

Add support for integrating clang as a platform toolset for Visual Studio 2017.

In prior versions of Visual Studio, MSBuild was installed separately in its own known directory location and the platform toolset information was placed within that direcotry.  In VS2017, MSBuild is installed in the VS 2017 directory and the platform toolset information is placed in a different directory within the VS 2017 directory.  Use the vswhere program (https://github.com/Microsoft/vswhere) to locate the installation of VS 2017.   vswhere is guaranteed to be placed in a known location on a machine, and can then be used to locate VS 2017 installs.   With that information we can install the .props and .targets files for MSBuild.   These are slightly modified versions of the (misnamed) VS 2014 files.

Visual Studio allows side-by-side installations, including installations of different products (Community, Professional, and Enterprise) with the same version and the same product with the same version.   For now, just use the latest version of VS 2017 in the install and uninstall scripts, so we get predictable behavior.   We leave it as future work for someone else to deal with side-by-side installs.

Testing:  this change is being backported from https://github.com/Microsoft/checkedc-llvm.    Other people have tried out the change there and it has worked for them.  I locally built a clean version of the Windows LLVM installer with the backported change and tried it out.  It worked fine.


Repository:
  rC Clang

https://reviews.llvm.org/D48886

Files:
  tools/msbuild/CMakeLists.txt
  tools/msbuild/install.bat
  tools/msbuild/toolset-vs2017.targets
  tools/msbuild/toolset-vs2017_xp.targets
  tools/msbuild/uninstall.bat
  utils/lit/lit/TestingConfig.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48886.153933.patch
Type: text/x-patch
Size: 8624 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180703/cea43ae8/attachment-0001.bin>


More information about the cfe-commits mailing list