* [PATCH 0/2] build eal & ring libraries with MSVC
@ 2024-02-27 19:21 Tyler Retzlaff
2024-02-27 19:21 ` [PATCH 1/2] build: build eal library " Tyler Retzlaff
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Tyler Retzlaff @ 2024-02-27 19:21 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson, Tyler Retzlaff
Enable build of eal & ring library when building with MSVC.
This series depends on 2 other series that seem to be near being
accepted for merge.
https://patches.dpdk.org/project/dpdk/list/?series=31229
https://patches.dpdk.org/project/dpdk/list/?series=31230
Since the rc2 deadline is soon this series is being submitted now
to solicit feedback. The CI is expected to fail without the above
series being merged.
Tyler Retzlaff (2):
build: build eal library with MSVC
build: build ring library with MSVC
config/meson.build | 10 +++++++++-
lib/eal/include/rte_common.h | 2 ++
lib/meson.build | 2 ++
3 files changed, 13 insertions(+), 1 deletion(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] build: build eal library with MSVC
2024-02-27 19:21 [PATCH 0/2] build eal & ring libraries with MSVC Tyler Retzlaff
@ 2024-02-27 19:21 ` Tyler Retzlaff
2024-02-27 19:22 ` [PATCH 2/2] build: build ring " Tyler Retzlaff
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Tyler Retzlaff @ 2024-02-27 19:21 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson, Tyler Retzlaff
* MSVC now has limited handling of GCC __extension__ keyword when
compiling C so only expand __extension__ empty on MSVC when
building with C++.
* When building with MSVC enable the statement expressions compiler
extension.
* When building with MSVC enable building of eal library.
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
config/meson.build | 7 ++++++-
lib/eal/include/rte_common.h | 2 ++
lib/meson.build | 1 +
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/config/meson.build b/config/meson.build
index f8f2149..68186e1 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -39,13 +39,18 @@ if is_ms_compiler
# temporarily disable msvc specific warnings
# - 4244 compiler detected conversion of integer to smaller type
# - 4267 compiler detected conversion of size_t to smaller type
- add_project_arguments('/wd4244', '/wd4267', language: 'c')
+ # - 4146 unary minus applied to unsigned type
+ add_project_arguments('/wd4244', '/wd4267', '/wd4146', language: 'c')
# enable non-locking atomic operations
add_project_arguments('/experimental:c11atomics', language: 'c')
# enable typeof operator
add_project_arguments('/d1experimental:typeof', language: 'c')
+
+ # enable statement expressions extension
+ add_project_arguments('/experimental:statementExpressions', language: 'c')
+
endif
# set the major version, which might be used by drivers and libraries
diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h
index 1cc1222..99128d8 100644
--- a/lib/eal/include/rte_common.h
+++ b/lib/eal/include/rte_common.h
@@ -38,8 +38,10 @@
#endif
#ifdef RTE_TOOLCHAIN_MSVC
+#ifdef __cplusplus
#define __extension__
#endif
+#endif
/*
* RTE_TOOLCHAIN_GCC is defined if the target is built with GCC,
diff --git a/lib/meson.build b/lib/meson.build
index 4fb01f0..d77bfbc 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -73,6 +73,7 @@ if is_ms_compiler
'log',
'kvargs',
'telemetry',
+ 'eal',
]
endif
--
1.8.3.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] build: build ring library with MSVC
2024-02-27 19:21 [PATCH 0/2] build eal & ring libraries with MSVC Tyler Retzlaff
2024-02-27 19:21 ` [PATCH 1/2] build: build eal library " Tyler Retzlaff
@ 2024-02-27 19:22 ` Tyler Retzlaff
2024-02-28 9:07 ` [PATCH 0/2] build eal & ring libraries " Bruce Richardson
2024-03-06 10:00 ` David Marchand
3 siblings, 0 replies; 6+ messages in thread
From: Tyler Retzlaff @ 2024-02-27 19:22 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson, Tyler Retzlaff
* Use RTE_USE_C11_MEM_MODEL when building with MSVC.
* When building with MSVC enable building of ring library.
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
config/meson.build | 3 +++
lib/meson.build | 1 +
2 files changed, 4 insertions(+)
diff --git a/config/meson.build b/config/meson.build
index 68186e1..b995ac6 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -32,6 +32,9 @@ if is_ms_compiler
# does not support inline assembly
dpdk_conf.set('RTE_FORCE_INTRINSICS', 1)
+ # force the use of C++11 memory model in lib/ring
+ dpdk_conf.set('RTE_USE_C11_MEM_MODEL', 1)
+
# suppress warnings raised for using standard library functions
# the MSVC compiler regards as unsafe but are used by DPDK
dpdk_conf.set('_CRT_SECURE_NO_WARNINGS', 1)
diff --git a/lib/meson.build b/lib/meson.build
index d77bfbc..179a272 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -74,6 +74,7 @@ if is_ms_compiler
'kvargs',
'telemetry',
'eal',
+ 'ring',
]
endif
--
1.8.3.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] build eal & ring libraries with MSVC
2024-02-27 19:21 [PATCH 0/2] build eal & ring libraries with MSVC Tyler Retzlaff
2024-02-27 19:21 ` [PATCH 1/2] build: build eal library " Tyler Retzlaff
2024-02-27 19:22 ` [PATCH 2/2] build: build ring " Tyler Retzlaff
@ 2024-02-28 9:07 ` Bruce Richardson
2024-03-06 10:00 ` David Marchand
3 siblings, 0 replies; 6+ messages in thread
From: Bruce Richardson @ 2024-02-28 9:07 UTC (permalink / raw)
To: Tyler Retzlaff; +Cc: dev
On Tue, Feb 27, 2024 at 11:21:58AM -0800, Tyler Retzlaff wrote:
> Enable build of eal & ring library when building with MSVC.
>
> This series depends on 2 other series that seem to be near being
> accepted for merge.
>
> https://patches.dpdk.org/project/dpdk/list/?series=31229
> https://patches.dpdk.org/project/dpdk/list/?series=31230
>
> Since the rc2 deadline is soon this series is being submitted now
> to solicit feedback. The CI is expected to fail without the above
> series being merged.
>
> Tyler Retzlaff (2):
> build: build eal library with MSVC
> build: build ring library with MSVC
>
> config/meson.build | 10 +++++++++-
> lib/eal/include/rte_common.h | 2 ++
> lib/meson.build | 2 ++
> 3 files changed, 13 insertions(+), 1 deletion(-)
>
Series-acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] build eal & ring libraries with MSVC
2024-02-27 19:21 [PATCH 0/2] build eal & ring libraries with MSVC Tyler Retzlaff
` (2 preceding siblings ...)
2024-02-28 9:07 ` [PATCH 0/2] build eal & ring libraries " Bruce Richardson
@ 2024-03-06 10:00 ` David Marchand
2024-03-06 14:48 ` Patrick Robb
3 siblings, 1 reply; 6+ messages in thread
From: David Marchand @ 2024-03-06 10:00 UTC (permalink / raw)
To: Tyler Retzlaff, Patrick Robb; +Cc: dev, Bruce Richardson, ci
On Tue, Feb 27, 2024 at 8:22 PM Tyler Retzlaff
<roretzla@linux.microsoft.com> wrote:
>
> Enable build of eal & ring library when building with MSVC.
>
> This series depends on 2 other series that seem to be near being
> accepted for merge.
>
> https://patches.dpdk.org/project/dpdk/list/?series=31229
> https://patches.dpdk.org/project/dpdk/list/?series=31230
>
> Since the rc2 deadline is soon this series is being submitted now
> to solicit feedback. The CI is expected to fail without the above
> series being merged.
>
Series applied, thanks Tyler.
Btw, I noticed a failure in UNH for MSVC, but it is not reported as
such in patchwork.
https://lab.dpdk.org/results/dashboard/patchsets/29302/
https://patchwork.dpdk.org/project/dpdk/patch/1709061720-4843-3-git-send-email-roretzla@linux.microsoft.com/
Is there something to change in how UNH reports for the MSVC job?
--
David Marchand
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] build eal & ring libraries with MSVC
2024-03-06 10:00 ` David Marchand
@ 2024-03-06 14:48 ` Patrick Robb
0 siblings, 0 replies; 6+ messages in thread
From: Patrick Robb @ 2024-03-06 14:48 UTC (permalink / raw)
To: David Marchand; +Cc: Tyler Retzlaff, dev, Bruce Richardson, ci
On Wed, Mar 6, 2024 at 5:00 AM David Marchand <david.marchand@redhat.com> wrote:
>
> On Tue, Feb 27, 2024 at 8:22 PM Tyler Retzlaff
> <roretzla@linux.microsoft.com> wrote:
> >
> > Enable build of eal & ring library when building with MSVC.
> >
> > This series depends on 2 other series that seem to be near being
> > accepted for merge.
> >
> > https://patches.dpdk.org/project/dpdk/list/?series=31229
> > https://patches.dpdk.org/project/dpdk/list/?series=31230
> >
> > Since the rc2 deadline is soon this series is being submitted now
> > to solicit feedback. The CI is expected to fail without the above
> > series being merged.
> >
>
> Series applied, thanks Tyler.
>
> Btw, I noticed a failure in UNH for MSVC, but it is not reported as
> such in patchwork.
> https://lab.dpdk.org/results/dashboard/patchsets/29302/
> https://patchwork.dpdk.org/project/dpdk/patch/1709061720-4843-3-git-send-email-roretzla@linux.microsoft.com/
>
> Is there something to change in how UNH reports for the MSVC job?
Hi David,
There was a discussion about this on Slack in the infra-issues space.
You can see the correct test report here:
https://inbox.dpdk.org/test-report/65deb584.d40a0220.71354.9933SMTPIN_ADDED_MISSING@mx.google.com/
Which at the time of the discussion was the latest update for the
iol-compile-amd64-testing context sent to patchwork. So this appears
to be an anomaly.
>
>
> --
> David Marchand
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-03-06 14:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-27 19:21 [PATCH 0/2] build eal & ring libraries with MSVC Tyler Retzlaff
2024-02-27 19:21 ` [PATCH 1/2] build: build eal library " Tyler Retzlaff
2024-02-27 19:22 ` [PATCH 2/2] build: build ring " Tyler Retzlaff
2024-02-28 9:07 ` [PATCH 0/2] build eal & ring libraries " Bruce Richardson
2024-03-06 10:00 ` David Marchand
2024-03-06 14:48 ` Patrick Robb
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).