[PATCH] doc: update parameters to use for mlx5 on Windows

Dariusz Sosnowski dsosnowski at nvidia.com
Tue Jul 15 14:03:45 CEST 2025


Hi,

On Mon, May 05, 2025 at 08:22:41AM -0700, Andre Muezerie wrote:
> The linker parameters to use with MSVC and Clang differ.
> Showing explicitly what to use with each in the documentation.
> 
> Signed-off-by: Andre Muezerie <andremue at linux.microsoft.com>
> ---
>  doc/guides/platform/mlx5.rst | 20 ++++++++++++++++----
>  1 file changed, 16 insertions(+), 4 deletions(-)
> 
> diff --git a/doc/guides/platform/mlx5.rst b/doc/guides/platform/mlx5.rst
> index ab3107209a..7a5bea3b49 100644
> --- a/doc/guides/platform/mlx5.rst
> +++ b/doc/guides/platform/mlx5.rst
> @@ -268,14 +268,26 @@ configured by the ``ibverbs_link`` build option:
>  Compilation on Windows
>  ~~~~~~~~~~~~~~~~~~~~~~
>  
> -The DevX SDK location must be set through CFLAGS/LDFLAGS,
> -either::
> +The DevX SDK location must be set through CFLAGS/LDFLAGS.
> +When compiling with MSVC, use either::
>  
> -   meson.exe setup "-Dc_args=-I\"%DEVX_INC_PATH%\"" "-Dc_link_args=-L\"%DEVX_LIB_PATH%\"" ...
> +   meson.exe setup "-Dc_args=-I\"%DEVX_INC_PATH%\""
> +   "-Dc_link_args=-LIBPATH:\"%DEVX_LIB_PATH%\"" -Denable_stdatomic=true ...

This long command line can be split for readability,
using caret as line break:

	meson.exe setup ^
	  "-Dc_args=-I\"%DEVX_INC_PATH%\"" ^
	  "-Dc_link_args=-LIBPATH:\"%DEVX_LIB_PATH%\"" ^
	  -Denable_stdatomic=true ^
	  ...

The same applies to commands for clang.

>  
>  or::
>  
> -   set CFLAGS=-I"%DEVX_INC_PATH%" && set LDFLAGS=-L"%DEVX_LIB_PATH%" && meson.exe setup ...
> +   set CFLAGS=-I"%DEVX_INC_PATH%" && set LDFLAGS=-LIBPATH:"%DEVX_LIB_PATH%" &&
> +   meson.exe setup -Denable_stdatomic=true ...

&& are not really needed here and
it can be splitted into multiple lines for readability:

	set CFLAGS=-I"%DEVX_INC_PATH%"
	set LDFLAGS=-LIBPATH:"%DEVX_LIB_PATH%"
	meson.exe setup -Denable_stdatomic=true ...

The same applies to commands for clang.

> +
> +When compiling with Clang, use either::
> +
> +   meson.exe setup "-Dc_args=-I\"%DEVX_INC_PATH%\""
> +   "-Dc_link_args=-Wl,-LIBPATH:\"%DEVX_LIB_PATH%\"" ...

Shouldn't clang linker parameters stay as it was previously i.e., "-L..."?

> +
> +or::
> +
> +   set CFLAGS=-I"%DEVX_INC_PATH%" && set LDFLAGS=-Wl,-LIBPATH:"%DEVX_LIB_PATH%" &&
> +   meson.exe setup ...
>  
>  
>  .. _mlx5_common_env:

Best regards,
Dariusz Sosnowski


More information about the dev mailing list