1.. SPDX-License-Identifier: BSD-3-Clause 2 Copyright(c) 2019 Intel Corporation. 3 4Compiling the DPDK Target from Source 5===================================== 6 7System Requirements 8------------------- 9 10The DPDK and its applications require the Clang-LLVM C compiler 11and Microsoft MSVC linker. 12The Meson Build system is used to prepare the sources for compilation 13with the Ninja backend. 14The installation of these tools is covered in this section. 15 16 17Install the Compiler 18-------------------- 19 20Download and install the clang compiler from 21`LLVM website <http://releases.llvm.org/download.html>`_. 22For example, Clang-LLVM direct download link:: 23 24 http://releases.llvm.org/7.0.1/LLVM-7.0.1-win64.exe 25 26 27Install the Linker 28------------------ 29 30Download and install the Build Tools for Visual Studio to link and build the 31files on windows, 32from `Microsoft website <https://visualstudio.microsoft.com/downloads>`_. 33When installing build tools, select the "Visual C++ build tools" option 34and ensure the Windows SDK is selected. 35 36 37Install the Build System 38------------------------ 39 40Download and install the build system from 41`Meson website <http://mesonbuild.com/Getting-meson.html>`_. 42A good option to choose is the MSI installer for both meson and ninja together:: 43 44 http://mesonbuild.com/Getting-meson.html#installing-meson-and-ninja-with-the-msi-installer%22 45 46Install the Backend 47------------------- 48 49If using Ninja, download and install the backend from 50`Ninja website <https://ninja-build.org/>`_ or 51install along with the meson build system. 52 53Build the code 54-------------- 55 56The build environment is setup to build the EAL and the helloworld example by 57default. 58 59Using the ninja backend 60~~~~~~~~~~~~~~~~~~~~~~~~ 61 62Specifying the compiler might be required to complete the meson command. 63 64.. code-block:: console 65 66 set CC=clang 67 68To compile the examples, the flag ``-Dexamples`` is required. 69 70.. code-block:: console 71 72 cd C:\Users\me\dpdk 73 meson -Dexamples=helloworld build 74 cd build 75 ninja 76 77Run the helloworld example 78========================== 79 80Navigate to the examples in the build directory and run `dpdk-helloworld.exe`. 81 82.. code-block:: console 83 84 cd C:\Users\me\dpdk\build\examples 85 dpdk-helloworld.exe 86 hello from core 1 87 hello from core 3 88 hello from core 0 89 hello from core 2 90