<div dir="ltr">Should we also mention /p:CLToolExe for just swapping out the compiler without using a full toolset?<div><br></div><div>Also, should we include some notes on cmake usage? I.e. -G "Visual Studio 14 2015" -T "LLVM-vs2014" for the MSVS generator, and -DCMAKE_C_COMPILER=/path/to/llvm/bin/clang-cl.exe -DCMAKE_CXX_COMPILER=/path/to/llvm/bin/clang-cl.exe for the ninja generator? (Don't know if -T works with ninja and/or setting CMAKE_C(XX)_COMPILER works for msvc.)</div><div><br></div><div>I haven't tested either of these recently, but they all worked at some point and all were useful at some point.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 1, 2018 at 9:00 AM, Hans Wennborg via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: hans<br>
Date: Thu Mar 1 06:00:19 2018<br>
New Revision: 326434<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=326434&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=326434&view=rev</a><br>
Log:<br>
UsersManual: beef up the clang-cl text a little<br>
<br>
Modified:<br>
cfe/trunk/docs/UsersManual.rst<br>
<br>
Modified: cfe/trunk/docs/UsersManual.rst<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/UsersManual.rst?rev=326434&r1=326433&r2=326434&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/docs/<wbr>UsersManual.rst?rev=326434&r1=<wbr>326433&r2=326434&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/docs/UsersManual.rst (original)<br>
+++ cfe/trunk/docs/UsersManual.rst Thu Mar 1 06:00:19 2018<br>
@@ -2684,10 +2684,20 @@ compatibility with the Visual C++ compil<br>
To enable clang-cl to find system headers, libraries, and the linker when run<br>
from the command-line, it should be executed inside a Visual Studio Native Tools<br>
Command Prompt or a regular Command Prompt where the environment has been set<br>
-up using e.g. `vcvars32.bat <<a href="http://msdn.microsoft.com/en-us/library/f2ccy3wt.aspx" rel="noreferrer" target="_blank">http://msdn.microsoft.com/en-<wbr>us/library/f2ccy3wt.aspx</a>>`_.<br>
+up using e.g. `vcvarsall.bat <<a href="http://msdn.microsoft.com/en-us/library/f2ccy3wt.aspx" rel="noreferrer" target="_blank">http://msdn.microsoft.com/en-<wbr>us/library/f2ccy3wt.aspx</a>>`_.<br>
+<br>
+clang-cl can also be used from inside Visual Studio by selecting the LLVM<br>
+Platform Toolset. The toolset is installed by the LLVM installer, which can be<br>
+downloaded from the `LLVM release <<a href="http://releases.llvm.org/download.html" rel="noreferrer" target="_blank">http://releases.llvm.org/<wbr>download.html</a>>`_ or<br>
+`snapshot build <<a href="http://llvm.org/builds/" rel="noreferrer" target="_blank">http://llvm.org/builds/</a>>`_ web pages. To use the toolset,<br>
+select a project in Solution Explorer, open its Property Page (Alt+F7), and in<br>
+the "General" section of "Configuration Properties" change "Platform Toolset"<br>
+to e.g. LLVM-vs2014.<br>
+<br>
+To use the toolset with MSBuild directly, invoke it with e.g.<br>
+``/p:PlatformToolset=LLVM-<wbr>vs2014``. This allows trying out the clang-cl<br>
+toolchain without modifying your project files.<br>
<br>
-clang-cl can also be used from inside Visual Studio by using an LLVM Platform<br>
-Toolset.<br>
<br>
Command-Line Options<br>
--------------------<br>
<br>
<br>
______________________________<wbr>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>