DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: ferruh.yigit@amd.com
Subject: [PATCH v3 2/2] build: generate Windows build artefacts when needed
Date: Thu,  1 Dec 2022 11:08:47 +0100	[thread overview]
Message-ID: <20221201100847.322141-2-david.marchand@redhat.com> (raw)
In-Reply-To: <20221201100847.322141-1-david.marchand@redhat.com>

We have been generating some Windows and mingw artefacts on all OS while
there is no need for them.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/meson.build | 27 +++++++++++++--------------
 lib/meson.build     | 29 +++++++++++++++--------------
 2 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/drivers/meson.build b/drivers/meson.build
index 5188302057..c6d619200f 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -206,7 +206,6 @@ foreach subpath:subdirs
 
         # now build the shared driver
         version_map = '@0@/@1@/version.map'.format(meson.current_source_dir(), drv_path)
-        implib = 'lib' + lib_name + '.dll.a'
 
         lk_deps = []
         lk_args = []
@@ -227,25 +226,25 @@ foreach subpath:subdirs
             endif
         endif
 
-        def_file = custom_target(lib_name + '_def',
-                command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-                input: version_map,
-                output: '@0@_exports.def'.format(lib_name))
-
-        mingw_map = custom_target(lib_name + '_mingw',
-                command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-                input: version_map,
-                output: '@0@_mingw.map'.format(lib_name))
-
-        lk_deps += [def_file, mingw_map]
-
         if is_windows
             if is_ms_linker
+                def_file = custom_target(lib_name + '_def',
+                        command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
+                        input: version_map,
+                        output: '@0@_exports.def'.format(lib_name))
+                lk_deps += [def_file]
+
                 lk_args = ['-Wl,/def:' + def_file.full_path()]
                 if meson.version().version_compare('<0.54.0')
-                    lk_args += ['-Wl,/implib:drivers\\' + implib]
+                    lk_args += ['-Wl,/implib:drivers\\lib' + lib_name + '.dll.a']
                 endif
             else
+                mingw_map = custom_target(lib_name + '_mingw',
+                        command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
+                        input: version_map,
+                        output: '@0@_mingw.map'.format(lib_name))
+                lk_deps += [mingw_map]
+
                 lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
             endif
         else
diff --git a/lib/meson.build b/lib/meson.build
index fd55925340..a90fee31b7 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -224,34 +224,35 @@ foreach l:libraries
         # RTE_BUILD_SHARED_LIB defined
         cflags += '-DRTE_BUILD_SHARED_LIB'
     endif
-    version_map = '@0@/@1@/version.map'.format(
-            meson.current_source_dir(), l)
-    implib = 'librte_' + l + '.dll.a'
 
-    def_file = custom_target(libname + '_def',
-            command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-            input: version_map,
-            output: '@0@_exports.def'.format(libname))
-
-    mingw_map = custom_target(libname + '_mingw',
-            command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-            input: version_map,
-            output: '@0@_mingw.map'.format(libname))
+    version_map = '@0@/@1@/version.map'.format(meson.current_source_dir(), l)
+    lk_deps = [version_map]
 
     if is_ms_linker
+        def_file = custom_target(libname + '_def',
+                command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
+                input: version_map,
+                output: '@0@_exports.def'.format(libname))
+        lk_deps += [def_file]
+
         lk_args = ['-Wl,/def:' + def_file.full_path()]
         if meson.version().version_compare('<0.54.0')
-            lk_args += ['-Wl,/implib:lib\\' + implib]
+            lk_args += ['-Wl,/implib:lib\\librte_' + l + '.dll.a']
         endif
     else
         if is_windows
+            mingw_map = custom_target(libname + '_mingw',
+                    command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
+                    input: version_map,
+                    output: '@0@_mingw.map'.format(libname))
+            lk_deps += [mingw_map]
+
             lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
         else
             lk_args = ['-Wl,--version-script=' + version_map]
         endif
     endif
 
-    lk_deps = [version_map, def_file, mingw_map]
     if developer_mode and not is_windows
         # on unix systems check the output of the
         # check-symbols.sh script, using it as a
-- 
2.38.1


  reply	other threads:[~2022-12-01 10:09 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29 14:00 [PATCH] drivers: fix symbol exports when map is omitted David Marchand
2022-11-29 18:23 ` Ferruh Yigit
2022-11-30  7:13   ` David Marchand
2022-11-30  8:27     ` David Marchand
2022-11-30  9:19       ` Ferruh Yigit
2022-12-02  0:11   ` Tyler Retzlaff
2022-11-30 10:02 ` [PATCH v2] " David Marchand
2022-11-30 10:44   ` Ferruh Yigit
2022-11-30 15:02     ` David Marchand
2022-11-30 15:24       ` David Marchand
2022-11-30 15:42       ` Bruce Richardson
2022-12-01 10:11         ` David Marchand
2022-12-01 10:08 ` [PATCH v3 1/2] " David Marchand
2022-12-01 10:08   ` David Marchand [this message]
2022-12-01 11:01     ` [PATCH v3 2/2] build: generate Windows build artefacts when needed Bruce Richardson
2022-12-01 10:55   ` [PATCH v3 1/2] drivers: fix symbol exports when map is omitted Bruce Richardson
2022-12-02 10:01     ` David Marchand
2022-12-02 11:09 ` [PATCH v4 " David Marchand
2022-12-02 11:09   ` [PATCH v4 2/2] build: generate Windows build artefacts when needed David Marchand
2022-12-02 13:39   ` [PATCH v4 1/2] drivers: fix symbol exports when map is omitted Aaron Conole
2022-12-05 10:23     ` David Marchand
2022-12-05 10:43       ` [EXT] " Akhil Goyal
2022-12-05 12:36         ` David Marchand
2022-12-05 13:47           ` Akhil Goyal
2022-12-05 15:37             ` Thomas Monjalon
2022-12-05 16:26               ` Akhil Goyal
2022-12-06 10:12               ` Ferruh Yigit
2022-12-06 10:18                 ` David Marchand
2022-12-06 12:25                   ` Ferruh Yigit
2022-12-07 18:00                     ` Patrick Robb
2022-12-08 13:22                       ` Thomas Monjalon
2022-12-08 16:06                         ` Patrick Robb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221201100847.322141-2-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).