From: Hans Wennborg Date: Thu, 1 Mar 2018 14:48:19 +0000 (+0000) Subject: UsersManual: improve the clang-cl text some more X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e9c5141c8f3310da5fe63bdda25128eae13394ca;p=clang UsersManual: improve the clang-cl text some more git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@326438 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/docs/UsersManual.rst b/docs/UsersManual.rst index 62b53998b5..f19aacc4e9 100644 --- a/docs/UsersManual.rst +++ b/docs/UsersManual.rst @@ -2698,6 +2698,23 @@ To use the toolset with MSBuild directly, invoke it with e.g. ``/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 --------------------