[v7,1/3] eal: disable function versioning on Windows

Message ID 20200706113241.28748-2-fady@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series build mempool on Windows |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation fail apply issues

Commit Message

Fady Bader July 6, 2020, 11:32 a.m. UTC
  Function versioning implementation is not supported by Windows.
Function versioning is disabled on Windows.

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 doc/guides/windows_gsg/intro.rst | 4 ++++
 lib/meson.build                  | 6 +++++-
 2 files changed, 9 insertions(+), 1 deletion(-)
  

Comments

Bruce Richardson July 6, 2020, 12:22 p.m. UTC | #1
On Mon, Jul 06, 2020 at 02:32:39PM +0300, Fady Bader wrote:
> Function versioning implementation is not supported by Windows.
> Function versioning is disabled on Windows.
> 
> Signed-off-by: Fady Bader <fady@mellanox.com>
> ---
>  doc/guides/windows_gsg/intro.rst | 4 ++++
>  lib/meson.build                  | 6 +++++-
>  2 files changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/doc/guides/windows_gsg/intro.rst b/doc/guides/windows_gsg/intro.rst
> index a0285732df..58c6246404 100644
> --- a/doc/guides/windows_gsg/intro.rst
> +++ b/doc/guides/windows_gsg/intro.rst
> @@ -18,3 +18,7 @@ DPDK for Windows is currently a work in progress. Not all DPDK source files
>  compile. Support is being added in pieces so as to limit the overall scope
>  of any individual patch series. The goal is to be able to run any DPDK
>  application natively on Windows.
> +
> +The :doc:`../contributing/abi_policy` cannot be respected for Windows.
> +Minor ABI versions may be incompatible
> +because function versioning is not supported on Windows.
> diff --git a/lib/meson.build b/lib/meson.build
> index c1b9e1633f..dadf151f78 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -107,6 +107,10 @@ foreach l:libraries
>  			shared_dep = declare_dependency(include_directories: includes)
>  			static_dep = shared_dep
>  		else
> +			if is_windows and use_function_versioning
> +				message('@0@: Function versioning is not supported by Windows.'
> +				.format(name))
> +			endif
>  

This is ok here, but I think it might be better just moved to somewhere
like config/meson.build, so that it is always just printed once for each
build. I don't see an issue with having it printed even if there is no
function versioning in the build itself.

>  			if use_function_versioning
>  				cflags += '-DRTE_USE_FUNCTION_VERSIONING'
> @@ -138,7 +142,7 @@ foreach l:libraries
>  					include_directories: includes,
>  					dependencies: static_deps)
>  
> -			if not use_function_versioning
> +			if not use_function_versioning or is_windows
>  				# use pre-build objects to build shared lib
>  				sources = []
>  				objs += static_lib.extract_all_objects(recursive: false)
> -- 
> 2.16.1.windows.4
> 

With or without the code move above, which is just a suggestion,

Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  
Thomas Monjalon July 6, 2020, 11:16 p.m. UTC | #2
06/07/2020 14:22, Bruce Richardson:
> On Mon, Jul 06, 2020 at 02:32:39PM +0300, Fady Bader wrote:
> > Function versioning implementation is not supported by Windows.
> > Function versioning is disabled on Windows.
> > 
> > Signed-off-by: Fady Bader <fady@mellanox.com>
> > ---
> >  doc/guides/windows_gsg/intro.rst | 4 ++++
> >  lib/meson.build                  | 6 +++++-
> >  2 files changed, 9 insertions(+), 1 deletion(-)
> > 
> > diff --git a/doc/guides/windows_gsg/intro.rst b/doc/guides/windows_gsg/intro.rst
> > index a0285732df..58c6246404 100644
> > --- a/doc/guides/windows_gsg/intro.rst
> > +++ b/doc/guides/windows_gsg/intro.rst
> > @@ -18,3 +18,7 @@ DPDK for Windows is currently a work in progress. Not all DPDK source files
> >  compile. Support is being added in pieces so as to limit the overall scope
> >  of any individual patch series. The goal is to be able to run any DPDK
> >  application natively on Windows.
> > +
> > +The :doc:`../contributing/abi_policy` cannot be respected for Windows.
> > +Minor ABI versions may be incompatible
> > +because function versioning is not supported on Windows.
> > diff --git a/lib/meson.build b/lib/meson.build
> > index c1b9e1633f..dadf151f78 100644
> > --- a/lib/meson.build
> > +++ b/lib/meson.build
> > @@ -107,6 +107,10 @@ foreach l:libraries
> >  			shared_dep = declare_dependency(include_directories: includes)
> >  			static_dep = shared_dep
> >  		else
> > +			if is_windows and use_function_versioning
> > +				message('@0@: Function versioning is not supported by Windows.'
> > +				.format(name))
> > +			endif
> >  
> 
> This is ok here, but I think it might be better just moved to somewhere
> like config/meson.build, so that it is always just printed once for each
> build. I don't see an issue with having it printed even if there is no
> function versioning in the build itself.

Moving such message in config/meson.build is the same
as moving it to the doc.
I prefer having a message each time a library compatibility
is required but not possible.

> With or without the code move above, which is just a suggestion,
> 
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

OK thanks, I'll merge as is.
  

Patch

diff --git a/doc/guides/windows_gsg/intro.rst b/doc/guides/windows_gsg/intro.rst
index a0285732df..58c6246404 100644
--- a/doc/guides/windows_gsg/intro.rst
+++ b/doc/guides/windows_gsg/intro.rst
@@ -18,3 +18,7 @@  DPDK for Windows is currently a work in progress. Not all DPDK source files
 compile. Support is being added in pieces so as to limit the overall scope
 of any individual patch series. The goal is to be able to run any DPDK
 application natively on Windows.
+
+The :doc:`../contributing/abi_policy` cannot be respected for Windows.
+Minor ABI versions may be incompatible
+because function versioning is not supported on Windows.
diff --git a/lib/meson.build b/lib/meson.build
index c1b9e1633f..dadf151f78 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -107,6 +107,10 @@  foreach l:libraries
 			shared_dep = declare_dependency(include_directories: includes)
 			static_dep = shared_dep
 		else
+			if is_windows and use_function_versioning
+				message('@0@: Function versioning is not supported by Windows.'
+				.format(name))
+			endif
 
 			if use_function_versioning
 				cflags += '-DRTE_USE_FUNCTION_VERSIONING'
@@ -138,7 +142,7 @@  foreach l:libraries
 					include_directories: includes,
 					dependencies: static_deps)
 
-			if not use_function_versioning
+			if not use_function_versioning or is_windows
 				# use pre-build objects to build shared lib
 				sources = []
 				objs += static_lib.extract_all_objects(recursive: false)