Document the basic requirements for download and add an option describing how to build with MSVC.
Signed-off-by: Tyler Retzlaff <roret...@linux.microsoft.com> --- doc/guides/windows_gsg/build_dpdk.rst | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) 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 -- 1.8.3.1