Should we also mention /p:CLToolExe for just swapping out the compiler without using a full toolset?
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.) I haven't tested either of these recently, but they all worked at some point and all were useful at some point. On Thu, Mar 1, 2018 at 9:00 AM, Hans Wennborg via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: hans > Date: Thu Mar 1 06:00:19 2018 > New Revision: 326434 > > URL: http://llvm.org/viewvc/llvm-project?rev=326434&view=rev > Log: > UsersManual: beef up the clang-cl text a little > > 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=326434&r1=326433&r2=326434&view=diff > ============================================================ > ================== > --- cfe/trunk/docs/UsersManual.rst (original) > +++ cfe/trunk/docs/UsersManual.rst Thu Mar 1 06:00:19 2018 > @@ -2684,10 +2684,20 @@ compatibility with the Visual C++ compil > To enable clang-cl to find system headers, libraries, and the linker when > run > from the command-line, it should be executed inside a Visual Studio > Native Tools > Command Prompt or a regular Command Prompt where the environment has been > set > -up using e.g. `vcvars32.bat <http://msdn.microsoft.com/en- > us/library/f2ccy3wt.aspx>`_. > +up using e.g. `vcvarsall.bat <http://msdn.microsoft.com/en- > us/library/f2ccy3wt.aspx>`_. > + > +clang-cl can also be used from inside Visual Studio by selecting the LLVM > +Platform Toolset. The toolset is installed by the LLVM installer, which > can be > +downloaded from the `LLVM release <http://releases.llvm.org/download.html>`_ > or > +`snapshot build <http://llvm.org/builds/>`_ web pages. To use the > toolset, > +select a project in Solution Explorer, open its Property Page (Alt+F7), > and in > +the "General" section of "Configuration Properties" change "Platform > Toolset" > +to e.g. LLVM-vs2014. > + > +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. > > -clang-cl can also be used from inside Visual Studio by using an LLVM > Platform > -Toolset. > > Command-Line Options > -------------------- > > > _______________________________________________ > cfe-commits mailing list > cfe-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits