* [PATCH] doc: update parameters to use for mlx5 on Windows
@ 2025-05-05 15:22 Andre Muezerie
2025-07-15 12:03 ` Dariusz Sosnowski
2025-07-15 14:14 ` [PATCH v2] " Andre Muezerie
0 siblings, 2 replies; 4+ messages in thread
From: Andre Muezerie @ 2025-05-05 15:22 UTC (permalink / raw)
To: Dariusz Sosnowski, Viacheslav Ovsiienko, Bing Zhao, Ori Kam,
Suanming Mou, Matan Azrad
Cc: dev, Andre Muezerie
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@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 ...
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 ...
+
+When compiling with Clang, use either::
+
+ meson.exe setup "-Dc_args=-I\"%DEVX_INC_PATH%\""
+ "-Dc_link_args=-Wl,-LIBPATH:\"%DEVX_LIB_PATH%\"" ...
+
+or::
+
+ set CFLAGS=-I"%DEVX_INC_PATH%" && set LDFLAGS=-Wl,-LIBPATH:"%DEVX_LIB_PATH%" &&
+ meson.exe setup ...
.. _mlx5_common_env:
--
2.49.0.vfs.0.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] doc: update parameters to use for mlx5 on Windows
2025-05-05 15:22 [PATCH] doc: update parameters to use for mlx5 on Windows Andre Muezerie
@ 2025-07-15 12:03 ` Dariusz Sosnowski
2025-07-15 13:57 ` Andre Muezerie
2025-07-15 14:14 ` [PATCH v2] " Andre Muezerie
1 sibling, 1 reply; 4+ messages in thread
From: Dariusz Sosnowski @ 2025-07-15 12:03 UTC (permalink / raw)
To: Andre Muezerie
Cc: Viacheslav Ovsiienko, Bing Zhao, Ori Kam, Suanming Mou, Matan Azrad, dev
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@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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] doc: update parameters to use for mlx5 on Windows
2025-07-15 12:03 ` Dariusz Sosnowski
@ 2025-07-15 13:57 ` Andre Muezerie
0 siblings, 0 replies; 4+ messages in thread
From: Andre Muezerie @ 2025-07-15 13:57 UTC (permalink / raw)
To: Dariusz Sosnowski
Cc: Viacheslav Ovsiienko, Bing Zhao, Ori Kam, Suanming Mou, Matan Azrad, dev
On Tue, Jul 15, 2025 at 02:03:45PM +0200, Dariusz Sosnowski wrote:
> 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@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%\"" ...
>
Thanks, that indeed makes the commands easier to read.
> Shouldn't clang linker parameters stay as it was previously i.e., "-L..."?
Not on Windows. It can be confirmed by looking at build\meson-logs\meson-log.txt,
where it can be seen that the -L option ends up being ignored:
Sanity check compiler command line: clang sanitycheckc.c -o sanitycheckc.exe -IV:\soft\MLNX_WinOF2_DevX_SDK\inc -D_FILE_OFFSET_BITS=64 -Wl,-LV:\soft\MLNX_WinOF2_DevX_SDK\lib
Sanity check compile stdout:
LINK : warning LNK4044: unrecognized option '/LV:\soft\MLNX_WinOF2_DevX_SDK\lib'; ignored
As a result the lib mlx5devx is not found:
Has header "mlx5devx.h" : YES
Library mlx5devx found: NO
I'll send out a new version of this patch with the changes suggested.
Best regards,
Andre Muezerie
>
> > +
> > +or::
> > +
> > + set CFLAGS=-I"%DEVX_INC_PATH%" && set LDFLAGS=-Wl,-LIBPATH:"%DEVX_LIB_PATH%" &&
> > + meson.exe setup ...
> >
> >
> > .. _mlx5_common_env:
>
> Best regards,
> Dariusz Sosnowski
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] doc: update parameters to use for mlx5 on Windows
2025-05-05 15:22 [PATCH] doc: update parameters to use for mlx5 on Windows Andre Muezerie
2025-07-15 12:03 ` Dariusz Sosnowski
@ 2025-07-15 14:14 ` Andre Muezerie
1 sibling, 0 replies; 4+ messages in thread
From: Andre Muezerie @ 2025-07-15 14:14 UTC (permalink / raw)
To: andremue; +Cc: bingz, dev, dsosnowski, matan, orika, suanmingm, viacheslavo
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@linux.microsoft.com>
---
doc/guides/platform/mlx5.rst | 27 +++++++++++++++++++++++----
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/doc/guides/platform/mlx5.rst b/doc/guides/platform/mlx5.rst
index ab3107209a..94ed59b170 100644
--- a/doc/guides/platform/mlx5.rst
+++ b/doc/guides/platform/mlx5.rst
@@ -268,14 +268,33 @@ 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 ^
+ ...
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 ...
+
+When compiling with Clang, use either::
+
+ meson.exe setup ^
+ "-Dc_args=-I\"%DEVX_INC_PATH%\"" ^
+ "-Dc_link_args=-Wl,-LIBPATH:\"%DEVX_LIB_PATH%\"" ^
+ ...
+
+or::
+
+ set CFLAGS=-I"%DEVX_INC_PATH%"
+ set LDFLAGS=-Wl,-LIBPATH:"%DEVX_LIB_PATH%"
+ meson.exe setup ...
.. _mlx5_common_env:
--
2.50.1.vfs.0.0
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-07-15 14:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-05 15:22 [PATCH] doc: update parameters to use for mlx5 on Windows Andre Muezerie
2025-07-15 12:03 ` Dariusz Sosnowski
2025-07-15 13:57 ` Andre Muezerie
2025-07-15 14:14 ` [PATCH v2] " Andre Muezerie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).