[PATCH] D42762: Rewrite the VS Integration Scripts

Olga Arkhipova via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 5 17:16:45 PST 2018


olgaark added inline comments.


================
Comment at: llvm/tools/msbuild/Clang.Cpp.Common.props:49
+    <CLToolExe>clang-cl.exe</CLToolExe>
+    <CLToolPath>$(LLVMInstallDir)bin</CLToolPath>
+
----------------
zturner wrote:
> olgaark wrote:
> > hans wrote:
> > > It's embarrassing that we didn't figure this out before :-)
> > > 
> > > With this, we can remove
> > > 
> > > ```
> > >  if (MSVC)
> > >     list(APPEND CLANG_LINKS_TO_CREATE ../msbuild-bin/cl)
> > >   endif()
> > > ```
> > > 
> > > from Clang's tools/driver/CMakeLists.txt
> > Yes, you can redefine CLToolExe/Path if you want to use 'cl' task, but have you looked at using 'ClangCompile' task instead (see Microsoft.Cpp.Clang.props & targets, as well as clang c2 toolset)?  Would it work better for you? If not, we'll interested to know why.
> My understanding of the `ClangCompile` task is that it invokes `clang.exe` or `clang++.exe` and that it passes gcc style command line options (for example, `clang.xml` looks like it passes all gcc style options such as `-fno-exceptions`, etc. 
> 
> The clang cl driver (`clang-cl.exe`) is designed to be a drop in replacement for `cl.exe`, and accepts MSVC style command line arguments.  It's also the only supported way to produce native Windows exes (that's not to say you can't construct a `clang++.exe` command line that will do it, just that we only support it via the cl driver).
> 
> 
Ok, it makes sense to use 'cl' task then


https://reviews.llvm.org/D42762





More information about the llvm-commits mailing list