doc: document basic MSVC build requirements

Message ID 1700255994-5782-1-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series doc: document basic MSVC build requirements |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/github-robot: build fail github build: failed
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS

Commit Message

Tyler Retzlaff Nov. 17, 2023, 9:19 p.m. UTC
  Document the basic requirements for download and add an option
describing how to build with MSVC.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 doc/guides/windows_gsg/build_dpdk.rst | 33 ++++++++++++++++++++++++++++-----
 1 file changed, 28 insertions(+), 5 deletions(-)
  

Comments

Thomas Monjalon Nov. 27, 2023, 4:12 p.m. UTC | #1
17/11/2023 22:19, Tyler Retzlaff:
> Document the basic requirements for download and add an option
> describing how to build with MSVC.
> 
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>

Applied with few indent fixes, thanks.
  

Patch

diff --git a/doc/guides/windows_gsg/build_dpdk.rst b/doc/guides/windows_gsg/build_dpdk.rst
index 29f2b38..406e28f 100644
--- a/doc/guides/windows_gsg/build_dpdk.rst
+++ b/doc/guides/windows_gsg/build_dpdk.rst
@@ -10,8 +10,12 @@  System Requirements
 Building the DPDK and its applications requires one of the following
 environments:
 
-* The Clang-LLVM C compiler and Microsoft MSVC linker.
+* LLVM 14.0.0 (or later) and Microsoft MSVC linker.
 * The MinGW-w64 toolchain (either native or cross).
+* Microsoft Visual Studio 2022 (any edition).
+  - note Microsoft Visual Studio 2022 does not currently build enough
+    of DPDK to produce a working DPDK application but may be used to
+    validate that changes are portable between toolchains.
 
 The Meson Build system is used to prepare the sources for compilation
 with the Ninja backend.
@@ -54,6 +58,12 @@  Any thread model (POSIX or Win32) can be chosen, DPDK does not rely on it.
 Install to a folder without spaces in its name, like ``C:\MinGW``.
 This path is assumed for the rest of this guide.
 
+Option 3. Microsoft Visual Studio Toolset (MSVC)
+------------------------------------------------
+
+Install any edition of Microsoft Visual Studio 2022 from the Visual Studio
+website https://visualstudio.microsoft.com/downloads/
+
 
 Install the Build System
 ------------------------
@@ -64,7 +74,7 @@  A good option to choose is the MSI installer for both meson and ninja together::
 
 	http://mesonbuild.com/Getting-meson.html#installing-meson-and-ninja-with-the-msi-installer%22
 
-Recommended version is Meson 0.57.
+Required version is Meson 0.57.
 
 Versions starting from 0.58 are unusable with LLVM toolchain
 because of a `Meson issue <https://github.com/mesonbuild/meson/issues/8981>`_.
@@ -83,8 +93,8 @@  Build the code
 The build environment is setup to build the EAL and the helloworld example by
 default.
 
-Option 1. Native Build on Windows
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Option 1. Native Build on Windows using LLVM
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 When using Clang-LLVM, specifying the compiler might be required to complete
 the meson command:
@@ -105,7 +115,7 @@  To compile the examples, the flag ``-Dexamples`` is required.
 
     cd C:\Users\me\dpdk
     meson setup -Dexamples=helloworld build
-    ninja -C build
+    meson compile -C build
 
 Option 2. Cross-Compile with MinGW-w64
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -117,3 +127,16 @@  Depending on the distribution, paths in this file may need adjustments.
 
     meson setup --cross-file config/x86/cross-mingw -Dexamples=helloworld build
     ninja -C build
+
+Option 3. Native Build on Windows using MSVC
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Open a 'Developer PowerShell for VS 2022' prompt from the start menu. The
+developer prompt will configure the environment to select the appropriate
+compiler, linker and SDK paths required to build with Visual Studio 2022.
+
+.. code-block:: console
+
+    cd C:\Users\me\dpdk
+    meson setup -Denable_stdatomic=true build
+    meson compile -C build