[llvm] 25c8ffa - [docs] Clarify how to run cmake and llvm-lit with Visual Studio addressing PR45978
Yaron Keren via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 20 00:54:44 PDT 2021
Author: Yaron Keren
Date: 2021-08-20T10:54:35+03:00
New Revision: 25c8ffa223ecec8e0c4c3d3772886295bde0c0e9
URL: https://github.com/llvm/llvm-project/commit/25c8ffa223ecec8e0c4c3d3772886295bde0c0e9
DIFF: https://github.com/llvm/llvm-project/commit/25c8ffa223ecec8e0c4c3d3772886295bde0c0e9.diff
LOG: [docs] Clarify how to run cmake and llvm-lit with Visual Studio addressing PR45978
Differential Revision: https://reviews.llvm.org/D108444
Added:
Modified:
llvm/docs/GettingStartedVS.rst
Removed:
################################################################################
diff --git a/llvm/docs/GettingStartedVS.rst b/llvm/docs/GettingStartedVS.rst
index 2178c41824ea..8050187e49ba 100644
--- a/llvm/docs/GettingStartedVS.rst
+++ b/llvm/docs/GettingStartedVS.rst
@@ -111,6 +111,19 @@ Here's the short story for getting up and running quickly with LLVM:
you have the Visual Studio C++ Tools installed, not just Visual Studio
itself (trying to create a C++ project in Visual Studio will generally
download the C++ tools if they haven't already been).
+ * Run cmake from a "x86/x64 Native Tools Command Prompt" so Visual C++ will
+ be on the PATH and its environment variables are set. Do **not** use
+ ``CMAKE_C_COMPILER`` and ``CMAKE_CXX_COMPILER`` for this purpose:
+
+ .. code-block:: bat
+
+ **********************************************************************
+ ** Visual Studio 2019 Developer Command Prompt v16.11.1
+ ** Copyright (c) 2021 Microsoft Corporation
+ **********************************************************************
+ [vcvarsall.bat] Environment initialized for: 'x64'
+ c:\build> cmake ..\llvm\llvm -DLLVM_ENABLE_PROJECTS=clang -DLLVM_TARGETS_TO_BUILD=X86 -Thost=x64
+
* See the :doc:`LLVM CMake guide <CMake>` for detailed information about
how to configure the LLVM build.
* CMake generates project files for all build types. To select a specific
@@ -144,7 +157,7 @@ Here's the short story for getting up and running quickly with LLVM:
* If ``%PATH%`` does not contain GnuWin32, you may specify
``LLVM_LIT_TOOLS_DIR`` on CMake for the path to GnuWin32.
- * You can run LLVM tests by merely building the project "check". The test
+ * You can run LLVM tests by merely building the project "check-all". The test
results will be shown in the VS output window.
9. Test LLVM on the command line:
@@ -154,10 +167,10 @@ Here's the short story for getting up and running quickly with LLVM:
.. code-block:: bat
- C:\..\llvm> python ..\build\bin\llvm-lit --param build_config=Win32 --param build_mode=Debug --param llvm_site_config=../build/test/lit.site.cfg test
+ c:\llvm> python ..\build\Release\bin\llvm-lit.py llvm\test
This example assumes that Python is in your PATH variable, you
- have built a Win32 Debug version of llvm with a standard out of
+ have built a Release version of llvm with a standard out of
line build. You should not see any unexpected failures, but will
see many unsupported tests and expected failures.
@@ -165,7 +178,7 @@ Here's the short story for getting up and running quickly with LLVM:
.. code-block:: bat
- C:\..\llvm> python ..\build\bin\llvm-lit --param build_config=Win32 --param build_mode=Debug --param llvm_site_config=../build/test/lit.site.cfg test/path/to/test
+ c:\llvm> python ..\build\Release\bin\llvm-lit.py llvm\test\Transforms\Util
An Example Using the LLVM Tool Chain
More information about the llvm-commits
mailing list