[PATCH] D42762: Rewrite the VS Integration Scripts

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 13 14:34:37 PDT 2018


zturner updated this revision to Diff 155494.
zturner added a reviewer: dtarditi.
zturner added a comment.

I've got a new version of the VS integration here.  Below I'll outline the changes from the previous iteration.  Most of this is based on feedback from David Tarditi (who I'm now adding as a reviewer) and Hans.  But I also added something new that was my own idea.

1. We no longer present a custom UI of the options.  We do not change the layout of **any** builtin Microsoft UI page in any way.

2. We now silently discard certain command line options before passing them to clang-cl.  We only do this for options that generate `-Wunused-command-line` warnings and for which we never plan to support the option anyway (for example Fiber Safe Optimizations).

3. We hard-error on options that fundamentally change the assumptions about the way in which code should be compiled.  For example, /clr.  These types of options would result in an error anyway because clang wouldn't understand the code, but at least now the user has a more meaningful error message.

4. We remap /ZI and /Zi to /Z7.  See the comment in `LLVM.Cpp.Common.Targets` for a longer explanation.

5. Previously we let the user specify the Path to clang-cl.exe in the General page.  We did this by forking the general page and adding a field to it.  While this is arguably a "cleaner" user experience, it's more maintenance for us (and requires us to change a builtin UI page, which point #1 explains that we are no longer doing), and it may not continue to be a cleaner experience if we ever want to add more than just 1 field here (for example, path to lld-link.exe if/when we update the extension to support LLD).  So I made a separate page called LLVM.  This page appears whenever the LLVM Platform Toolset is selected.  For now it only contains one option (path to clang-cl.exe), but in the future it could contain other options such as "Use clang-cl (True/False)", "Path to clang-cl.exe", "Use LLD", "Path to lld-link.exe", and maybe some other ones we could come up with.

Hopefully this is a nice middle ground and addresses all of the issues we were discussing earlier in the thread.


https://reviews.llvm.org/D42762

Files:
  clang/tools/driver/CMakeLists.txt
  llvm/CMakeLists.txt
  llvm/tools/msbuild/.gitignore
  llvm/tools/msbuild/CMakeLists.txt
  llvm/tools/msbuild/LLVM.Cpp.Common.props
  llvm/tools/msbuild/LLVM.Cpp.Common.targets
  llvm/tools/msbuild/Microsoft.Cpp.Win32.LLVM-vs2010.targets
  llvm/tools/msbuild/Microsoft.Cpp.Win32.LLVM-vs2012.targets
  llvm/tools/msbuild/Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets
  llvm/tools/msbuild/Microsoft.Cpp.Win32.llvm.props.in
  llvm/tools/msbuild/Platformx64/Toolset.props
  llvm/tools/msbuild/Platformx64/Toolset.targets
  llvm/tools/msbuild/Platformx86/Toolset.props
  llvm/tools/msbuild/Platformx86/Toolset.targets
  llvm/tools/msbuild/clang-cl.xml
  llvm/tools/msbuild/install.bat
  llvm/tools/msbuild/license.txt
  llvm/tools/msbuild/llvm-general.xml
  llvm/tools/msbuild/llvm.csproj
  llvm/tools/msbuild/llvm.sln
  llvm/tools/msbuild/source.extension.vsixmanifest
  llvm/tools/msbuild/toolset-vs2013.targets
  llvm/tools/msbuild/toolset-vs2013_xp.targets
  llvm/tools/msbuild/toolset-vs2014.targets
  llvm/tools/msbuild/toolset-vs2014_xp.targets
  llvm/tools/msbuild/uninstall.bat

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42762.155494.patch
Type: text/x-patch
Size: 96699 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180713/015229fc/attachment.bin>


More information about the llvm-commits mailing list