From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3C49643359; Fri, 17 Nov 2023 22:19:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D3C49410FB; Fri, 17 Nov 2023 22:19:57 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id D9E424028B for ; Fri, 17 Nov 2023 22:19:56 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id C477820B74C0; Fri, 17 Nov 2023 13:19:55 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C477820B74C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1700255995; bh=SSLwgCxihXa6hxDQnfQ6JiSmWslIMc6o1Mx/4lUAV6Q=; h=From:To:Cc:Subject:Date:From; b=RkTEQrgyPRXpAM0L5J/gb/adtLzf6Q3ISsQklIJGL2BpozlSxVWsqYenWCmmvcj3Z vYG97Gz2m/tMKIMubRbvXZZFnag6KPzv1Dfs4pw5UHsJ/bl3lO1/MTFes1Vc83RDcD MDcsPEd7pRM/ZznsKFXkJhoNvFFQiZGHZPgeoSKI= From: Tyler Retzlaff To: dev@dpdk.org Cc: Dmitry Kozlyuk , Pallavi Kadam , Tyler Retzlaff Subject: [PATCH] doc: document basic MSVC build requirements Date: Fri, 17 Nov 2023 13:19:54 -0800 Message-Id: <1700255994-5782-1-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Document the basic requirements for download and add an option describing how to build with MSVC. Signed-off-by: Tyler Retzlaff --- 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 `_. @@ -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