Skip to content

Commit

Permalink
[docs] Add DIA register instructions to Getting Started with Visual S…
Browse files Browse the repository at this point in the history
…tudio page

Since Visual Studio 2017 the DIA libs are not registered by default, see:
https://docs.microsoft.com/en-us/visualstudio/extensibility/breaking-changes-2017?view=vs-2019#change-reduce-registry-impact
LLDB building instruction already specify registering these DLLs, required
both the LLVM PDB tests and LLDB build.

Differential Revision: https://reviews.llvm.org/D108811
  • Loading branch information
yrnkrn committed Aug 27, 2021
1 parent 6ad47e1 commit 692ebe5
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions llvm/docs/GettingStartedVS.rst
Expand Up @@ -82,7 +82,7 @@ These instruction were tested with Visual Studio 2019 and Python 3.9.6:
if you want to develop `lldb <https://lldb.llvm.org/>`_, selecting
**Download debug binaries** is useful.
7. Complete the Python installation.
8. Run a "Developer Command Prompt for VS 2019" as administrator. This command
8. Run a "Developer Command Prompt for VS 2019" **as administrator**. This command
prompt provides correct path and environment variables to Visual Studio and
the installed tools.
9. In the terminal window, type the commands:
Expand All @@ -96,7 +96,17 @@ These instruction were tested with Visual Studio 2019 and Python 3.9.6:
install into a path containing spaces (e.g. ``c:\Documents and Settings\...``)
as it will fail.

10. Install psutil and obtain LLVM source code:
10. Register the Microsoft Debug Interface Access (DIA) DLLs

.. code-block:: bat
regsvr32 "%VSINSTALLDIR%\DIA SDK\bin\msdia140.dll"
regsvr32 "%VSINSTALLDIR%\DIA SDK\bin\amd64\msdia140.dll"
The DIA library is required for LLVM PDB tests and
`LLDB development <https://lldb.llvm.org/resources/build.html>`_.

11. Install psutil and obtain LLVM source code:

.. code-block:: bat
Expand All @@ -108,7 +118,7 @@ These instruction were tested with Visual Studio 2019 and Python 3.9.6:
Select the last link: ``Source code (zip)`` and unpack the downloaded file using
Windows Explorer built-in zip support or any other unzip tool.

11. Finally, configure LLVM using CMake:
12. Finally, configure LLVM using CMake:

.. code-block:: bat
Expand Down Expand Up @@ -143,7 +153,7 @@ These instruction were tested with Visual Studio 2019 and Python 3.9.6:
want to use the 64-bit toolset, pass the ``-Thost=x64`` flag when
generating the Visual Studio solution. This requires CMake 3.8.0 or later.

12. Start Visual Studio and select configuration:
13. Start Visual Studio and select configuration:

In the directory you created the project files will have an ``llvm.sln``
file, just double-click on that to open Visual Studio. The default Visual
Expand All @@ -155,7 +165,7 @@ These instruction were tested with Visual Studio 2019 and Python 3.9.6:
compiler flags, disabling optimization and enabling debug information, only
for specific librares or source files you actually need to debug.

13. Test LLVM in Visual Studio:
14. Test LLVM in Visual Studio:

You can run LLVM tests by merely building the project "check-all". The test
results will be shown in the VS output window. Once the build succeeds, you
Expand Down

0 comments on commit 692ebe5

Please sign in to comment.