[v5,6/8] drivers: fix incorrect meson import folder for Windows
Checks
Commit Message
From: Tal Shnaiderman <talshn@mellanox.com>
import library (/IMPLIB) in meson.build should use
the 'drivers' and not 'libs' folder.
The error is: fatal error LNK1149: output filename matches input filename.
The fix uses the correct folder.
Fixes: 5ed3766981 ("drivers: process shared link dependencies as for libs")
Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
---
drivers/meson.build | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
Comments
Bruce, please could you review this patch?
09/06/2020 12:31, talshn@mellanox.com:
> From: Tal Shnaiderman <talshn@mellanox.com>
>
> import library (/IMPLIB) in meson.build should use
> the 'drivers' and not 'libs' folder.
>
> The error is: fatal error LNK1149: output filename matches input filename.
> The fix uses the correct folder.
>
> Fixes: 5ed3766981 ("drivers: process shared link dependencies as for libs")
>
> Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
> ---
> drivers/meson.build | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/meson.build b/drivers/meson.build
> index a7eac86790..e216011d47 100644
> --- a/drivers/meson.build
> +++ b/drivers/meson.build
> @@ -153,7 +153,7 @@ foreach class:dpdk_driver_classes
> version_map = '@0@/@1@/@2@_version.map'.format(
> meson.current_source_dir(),
> drv_path, lib_name)
> - implib = dir_name + '.dll.a'
> + implib = 'lib' + lib_name + '.dll.a'
>
> def_file = custom_target(lib_name + '_def',
> command: [map_to_def_cmd, '@INPUT@', '@OUTPUT@'],
> @@ -161,8 +161,12 @@ foreach class:dpdk_driver_classes
> output: '@0@_exports.def'.format(lib_name))
> lk_deps = [version_map, def_file]
> if is_windows
> - lk_args = ['-Wl,/def:' + def_file.full_path(),
> - '-Wl,/implib:lib\\' + implib]
> + if is_ms_linker
> + lk_args = ['-Wl,/def:' + def_file.full_path(),
> + '-Wl,/implib:drivers\\' + implib]
> + else
> + lk_args = []
> + endif
> else
> lk_args = ['-Wl,--version-script=' + version_map]
> # on unix systems check the output of the
>
On Tue, Jun 09, 2020 at 01:31:37PM +0300, talshn@mellanox.com wrote:
> From: Tal Shnaiderman <talshn@mellanox.com>
>
> import library (/IMPLIB) in meson.build should use
> the 'drivers' and not 'libs' folder.
>
> The error is: fatal error LNK1149: output filename matches input filename.
> The fix uses the correct folder.
>
> Fixes: 5ed3766981 ("drivers: process shared link dependencies as for libs")
>
> Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
> ---
> drivers/meson.build | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/meson.build b/drivers/meson.build
> index a7eac86790..e216011d47 100644
> --- a/drivers/meson.build
> +++ b/drivers/meson.build
> @@ -153,7 +153,7 @@ foreach class:dpdk_driver_classes
> version_map = '@0@/@1@/@2@_version.map'.format(
> meson.current_source_dir(),
> drv_path, lib_name)
> - implib = dir_name + '.dll.a'
> + implib = 'lib' + lib_name + '.dll.a'
>
> def_file = custom_target(lib_name + '_def',
> command: [map_to_def_cmd, '@INPUT@', '@OUTPUT@'],
> @@ -161,8 +161,12 @@ foreach class:dpdk_driver_classes
> output: '@0@_exports.def'.format(lib_name))
> lk_deps = [version_map, def_file]
> if is_windows
> - lk_args = ['-Wl,/def:' + def_file.full_path(),
> - '-Wl,/implib:lib\\' + implib]
> + if is_ms_linker
> + lk_args = ['-Wl,/def:' + def_file.full_path(),
> + '-Wl,/implib:drivers\\' + implib]
> + else
> + lk_args = []
> + endif
> else
> lk_args = ['-Wl,--version-script=' + version_map]
> # on unix systems check the output of the
This looks ok to me, seems like the previous, broken, version was just a
copy-paste (by me, I think!) from lib without updating to work with driver
paths. Not an expert on the different linker parameters needed, but assume
the submitter has those correct.
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
@@ -153,7 +153,7 @@ foreach class:dpdk_driver_classes
version_map = '@0@/@1@/@2@_version.map'.format(
meson.current_source_dir(),
drv_path, lib_name)
- implib = dir_name + '.dll.a'
+ implib = 'lib' + lib_name + '.dll.a'
def_file = custom_target(lib_name + '_def',
command: [map_to_def_cmd, '@INPUT@', '@OUTPUT@'],
@@ -161,8 +161,12 @@ foreach class:dpdk_driver_classes
output: '@0@_exports.def'.format(lib_name))
lk_deps = [version_map, def_file]
if is_windows
- lk_args = ['-Wl,/def:' + def_file.full_path(),
- '-Wl,/implib:lib\\' + implib]
+ if is_ms_linker
+ lk_args = ['-Wl,/def:' + def_file.full_path(),
+ '-Wl,/implib:drivers\\' + implib]
+ else
+ lk_args = []
+ endif
else
lk_args = ['-Wl,--version-script=' + version_map]
# on unix systems check the output of the