[dpdk-dev] [PATCH] windows: minor build fixes
Tal Shnaiderman
talshn at nvidia.com
Fri Oct 30 23:51:32 CET 2020
> Subject: Re: [dpdk-dev] [PATCH] windows: minor build fixes
>
>
> On 10/30/2020 10:46 AM, Nick Connolly wrote:
> > Don't run symlink-drivers-solibs.sh as part of 'install' because
> > Windows doesn't support shell scripts.
> >
> > Meson versions >= 0.54.0 include support for handling /implib with
> > msvc link. Specifying it explicitly causes failures when linking
> > against the dll. Tested using Link 14.27.29112.0 and Clang 11.0.0.
> >
> > Signed-off-by: Nick Connolly <nick.connolly at mayadata.io>
> > ---
> > config/meson.build | 8 +++++---
> > drivers/meson.build | 6 ++++--
> > lib/meson.build | 6 ++++--
> > 3 files changed, 13 insertions(+), 7 deletions(-)
> >
> > diff --git a/config/meson.build b/config/meson.build index
> > 258b01d06..a29693b88 100644
> > --- a/config/meson.build
> > +++ b/config/meson.build
> > @@ -57,9 +57,11 @@ eal_pmd_path = join_paths(get_option('prefix'),
> driver_install_path)
> > # driver .so files often depend upon the bus drivers for their connect bus,
> > # e.g. ixgbe depends on librte_bus_pci. This means that the bus drivers
> need
> > # to be in the library path, so symlink the drivers from the main lib
> directory.
> > -meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
> > - get_option('libdir'),
> > - pmd_subdir_opt)
> > +if not is_windows
> > + meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
> > + get_option('libdir'),
> > + pmd_subdir_opt)
> > +endif
> >
> > # set the machine type and cflags for it
> > if meson.is_cross_build()
> > diff --git a/drivers/meson.build b/drivers/meson.build index
> > 4bb7e9218..6b50f7238 100644
> > --- a/drivers/meson.build
> > +++ b/drivers/meson.build
> > @@ -186,8 +186,10 @@ foreach subpath:subdirs
> > lk_deps = [version_map, def_file, mingw_map]
> > if is_windows
> > if is_ms_linker
> > - lk_args = ['-Wl,/def:' + def_file.full_path(),
> > - '-Wl,/implib:drivers\\' + implib]
> > + lk_args = ['-Wl,/def:' + def_file.full_path()]
> > + if meson.version().version_compare('<0.54.0')
> > + lk_args += ['-Wl,/implib:drivers\\' + implib]
> > + endif
> > else
> > lk_args = ['-Wl,--version-script=' +
> mingw_map.full_path()]
> > endif
> > diff --git a/lib/meson.build b/lib/meson.build index
> > 1bb019720..ed00f8914 100644
> > --- a/lib/meson.build
> > +++ b/lib/meson.build
> > @@ -157,8 +157,10 @@ foreach l:libraries
> > output: '@0 at _mingw.map'.format(libname))
> >
> > if is_ms_linker
> > - lk_args = ['-Wl,/def:' + def_file.full_path(),
> > - '-Wl,/implib:lib\\' + implib]
> > + lk_args = ['-Wl,/def:' + def_file.full_path()]
> > + if meson.version().version_compare('<0.54.0')
> > + lk_args += ['-Wl,/implib:lib\\' + implib]
> > + endif
> > else
> > if is_windows
> > lk_args =
> > ['-Wl,--version-script=' + mingw_map.full_path()]
>
> Thanks, Nick. This finally fixes this problem I've been having since I upgraded
> to meson v0.54.
Do we know why meson changed its behavior of lib file location in versions > 0.54?
Was the old behavior of keeping lib files in the matching output folders incorrect?
BTW, although both are small changes, you should move the symlink-drivers-solibs.sh change to a separated patch.
>
> Tested-by: Ranjit Menon <ranjit.menon at intel.com>
> Acked-by: Ranjit Menon <ranjit.menon at intel.com>
More information about the dev
mailing list