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. There were a number of changes to the way that import libraries are handled between 0.47.1 and 0.54.0. Only make the change for >= 0.54.0, leaving the behaviour unchanged for earlier versions. Signed-off-by: Nick Connolly <nick.connolly@mayadata.io> Tested-by: Ranjit Menon <ranjit.menon@intel.com> Acked-by: Ranjit Menon <ranjit.menon@intel.com> --- v2: * split out config/meson.build change drivers/meson.build | 6 ++++-- lib/meson.build | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) 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@_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()] -- 2.25.1
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. There were a number of changes to the way that import libraries are handled between 0.47.1 and 0.54.0. Only make the change for >= 0.54.0, leaving the behaviour unchanged for earlier versions. Signed-off-by: Nick Connolly <nick.connolly@mayadata.io> Tested-by: Ranjit Menon <ranjit.menon@intel.com> Acked-by: Ranjit Menon <ranjit.menon@intel.com> --- v2: * split out config/meson.build change drivers/meson.build | 6 ++++-- lib/meson.build | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) 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@_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()] -- 2.25.1
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. There were a number of changes to the way that import libraries are handled between 0.47.1 and 0.54.0. Only make the change for >= 0.54.0, leaving the behaviour unchanged for earlier versions. Signed-off-by: Nick Connolly <nick.connolly@mayadata.io> Tested-by: Ranjit Menon <ranjit.menon@intel.com> Acked-by: Ranjit Menon <ranjit.menon@intel.com> --- v2: * split out config/meson.build change drivers/meson.build | 6 ++++-- lib/meson.build | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) 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@_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()] -- 2.25.1
Missing / incorrect '--in-reply-to'. Please ignore - still learning the
process!
On 31/10/2020 06:43, Nick Connolly wrote:
> 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.
>
> There were a number of changes to the way that import libraries
> are handled between 0.47.1 and 0.54.0. Only make the change
> for >= 0.54.0, leaving the behaviour unchanged for earlier
> versions.
>
> Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
> Tested-by: Ranjit Menon <ranjit.menon@intel.com>
> Acked-by: Ranjit Menon <ranjit.menon@intel.com>
> ---
> v2:
> * split out config/meson.build change
>
> drivers/meson.build | 6 ++++--
> lib/meson.build | 6 ++++--
> 2 files changed, 8 insertions(+), 4 deletions(-)
>
> 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@_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()]
> Subject: Re: [dpdk-dev] [PATCH v2] windows: minor build fixes > > > Missing / incorrect '--in-reply-to'. Please ignore - still learning the process! > > On 31/10/2020 06:43, Nick Connolly wrote: > > 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. > > How can we verify this behavior change in 0.54 is intentional? I cannot find it in the versions' release notes: https://mesonbuild.com/Release-notes-for-0-54-0.html > > There were a number of changes to the way that import libraries are > > handled between 0.47.1 and 0.54.0. Only make the change for >= 0.54.0, > > leaving the behaviour unchanged for earlier versions. > > > > Signed-off-by: Nick Connolly <nick.connolly@mayadata.io> > > Tested-by: Ranjit Menon <ranjit.menon@intel.com> > > Acked-by: Ranjit Menon <ranjit.menon@intel.com> > > --- > > v2: > > * split out config/meson.build change > > > > drivers/meson.build | 6 ++++-- > > lib/meson.build | 6 ++++-- > > 2 files changed, 8 insertions(+), 4 deletions(-) > > > > 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@_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()]
12/11/2020 22:35, Tal Shnaiderman: > > Subject: Re: [dpdk-dev] [PATCH v2] windows: minor build fixes > > > > Missing / incorrect '--in-reply-to'. Please ignore - still learning the process! > > > > On 31/10/2020 06:43, Nick Connolly wrote: > > > 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. > > > > > How can we verify this behavior change in 0.54 is intentional? > I cannot find it in the versions' release notes: > > https://mesonbuild.com/Release-notes-for-0-54-0.html I've found 2 commits touching implib in meson 0.54: https://github.com/mesonbuild/meson/commit/cace70c64eab4 https://github.com/mesonbuild/meson/commit/06bbf6cf9353f6
> Subject: Re: [dpdk-dev] [PATCH v2] windows: minor build fixes > > External email: Use caution opening links or attachments > > > 12/11/2020 22:35, Tal Shnaiderman: > > > Subject: Re: [dpdk-dev] [PATCH v2] windows: minor build fixes > > > > > > Missing / incorrect '--in-reply-to'. Please ignore - still learning the process! > > > > > > On 31/10/2020 06:43, Nick Connolly wrote: > > > > 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. > > > > > > > > How can we verify this behavior change in 0.54 is intentional? > > I cannot find it in the versions' release notes: > > > > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmes > o > > nbuild.com%2FRelease-notes-for-0-54- > 0.html&data=04%7C01%7Ctalshn%4 > > > 0nvidia.com%7C958236d4a61f4a12411808d887dcd2b7%7C43083d15727340c1 > b7db3 > > > 9efd9ccc17a%7C0%7C0%7C637408729782053998%7CUnknown%7CTWFpbGZs > b3d8eyJWI > > > joiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1 > 000&a > > > mp;sdata=21h2QD1OJQt88icTM0kd%2FbkuFzlBq4J5tMJRsh4x9LY%3D&r > eserved > > =0 > > I've found 2 commits touching implib in meson 0.54: > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith > ub.com%2Fmesonbuild%2Fmeson%2Fcommit%2Fcace70c64eab4&data > =04%7C01%7Ctalshn%40nvidia.com%7C958236d4a61f4a12411808d887dcd2b7 > %7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C637408729782053998 > %7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiL > CJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=w9k3%2FvRIWT8Jb > Bm0HXYGZSqW2i0%2BZfq05jzloobNdyc%3D&reserved=0 > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith > ub.com%2Fmesonbuild%2Fmeson%2Fcommit%2F06bbf6cf9353f6&data > =04%7C01%7Ctalshn%40nvidia.com%7C958236d4a61f4a12411808d887dcd2b7 > %7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C637408729782063987 > %7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiL > CJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=62PcG42%2FiD3n8s > 5%2BD7H6iYEvxS8hAGZFta1vR8suGSM%3D&reserved=0 > Thanks Thomas, I assume it's part of their changes in that area. >