r326438 - UsersManual: improve the clang-cl text some more

Hans Wennborg via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 1 06:48:19 PST 2018


Author: hans
Date: Thu Mar  1 06:48:19 2018
New Revision: 326438

URL: http://llvm.org/viewvc/llvm-project?rev=326438&view=rev
Log:
UsersManual: improve the clang-cl text some more

Modified:
    cfe/trunk/docs/UsersManual.rst

Modified: cfe/trunk/docs/UsersManual.rst
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/UsersManual.rst?rev=326438&r1=326437&r2=326438&view=diff
==============================================================================
--- cfe/trunk/docs/UsersManual.rst (original)
+++ cfe/trunk/docs/UsersManual.rst Thu Mar  1 06:48:19 2018
@@ -2698,6 +2698,23 @@ To use the toolset with MSBuild directly
 ``/p:PlatformToolset=LLVM-vs2014``. This allows trying out the clang-cl
 toolchain without modifying your project files.
 
+It's also possible to point MSBuild at clang-cl without changing toolset by
+passing ``/p:CLToolPath=c:\llvm\bin /p:CLToolExe=clang-cl.exe``.
+
+When using CMake and the Visual Studio generators, the toolset can be set with the ``-T`` flag:
+
+  ::
+
+    cmake -G"Visual Studio 15 2017" -T LLVM-vs2014 ..
+
+When using CMake with the Ninja generator, set the ``CMAKE_C_COMPILER`` and
+``CMAKE_CXX_COMPILER`` variables to clang-cl:
+
+  ::
+
+    cmake -GNinja -DCMAKE_C_COMPILER="c:/Program Files (x86)/LLVM/bin/clang-cl.exe"
+        -DCMAKE_CXX_COMPILER="c:/Program Files (x86)/LLVM/bin/clang-cl.exe" ..
+
 
 Command-Line Options
 --------------------




More information about the cfe-commits mailing list