DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Abdullah Ömer Yamaç" <omer.yamac@ceng.metu.edu.tr>
To: dev@dpdk.org
Cc: "Abdullah Ömer Yamaç" <omer.yamac@ceng.metu.edu.tr>,
	"Ferruh Yigit" <ferruh.yigit@amd.com>,
	"Bruce Richardson" <bruce.richardson@intel.com>
Subject: [PATCH v3 1/2] build: make version file optional for drivers
Date: Wed, 12 Oct 2022 13:29:53 +0300	[thread overview]
Message-ID: <20221012102954.180722-1-omer.yamac@ceng.metu.edu.tr> (raw)
In-Reply-To: <0e20fb90e9021512cea9d04e5f50473b@ceng.metu.edu.tr>

In this patch, we removed the necessity of the version files and
you don't need to update these files for each release, you can just
remove them.

Signed-off-by: Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr>
Suggested-by: Ferruh Yigit <ferruh.yigit@amd.com>
Series-acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/meson.build | 65 +++++++++++++++++++++++++--------------------
 1 file changed, 36 insertions(+), 29 deletions(-)

diff --git a/drivers/meson.build b/drivers/meson.build
index 216971f4e2..c0f3ec4037 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -1,6 +1,8 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
+fs = import('fs')
+
 # Defines the order of dependencies evaluation
 subdirs = [
         'common',
@@ -202,38 +204,43 @@ foreach subpath:subdirs
         version_map = '@0@/@1@/version.map'.format(meson.current_source_dir(), drv_path)
         implib = 'lib' + lib_name + '.dll.a'
 
-        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 = [version_map, def_file, mingw_map]
-        if is_windows
-            if is_ms_linker
-                lk_args = ['-Wl,/def:' + def_file.full_path()]
-                if meson.version().version_compare('<0.54.0')
-                    lk_args += ['-Wl,/implib:drivers\\' + implib]
+        lk_deps = []
+        lk_args = []
+        if fs.is_file(version_map)
+            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 = [version_map, def_file, mingw_map]
+            if is_windows
+                if is_ms_linker
+                    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
             else
-                lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
-            endif
-        else
-            lk_args = ['-Wl,--version-script=' + version_map]
-            if developer_mode
-                # on unix systems check the output of the
-                # check-symbols.sh script, using it as a
-                # dependency of the .so build
-                lk_deps += custom_target(lib_name + '.sym_chk',
-                        command: [check_symbols, version_map, '@INPUT@'],
-                        capture: true,
-                        input: static_lib,
-                        output: lib_name + '.sym_chk')
+                lk_args = ['-Wl,--version-script=' + version_map]
+                if developer_mode
+                    # on unix systems check the output of the
+                    # check-symbols.sh script, using it as a
+                    # dependency of the .so build
+                    lk_deps += custom_target(lib_name + '.sym_chk',
+                            command: [check_symbols, version_map, '@INPUT@'],
+                            capture: true,
+                            input: static_lib,
+                            output: lib_name + '.sym_chk')
+                endif
             endif
+
         endif
 
         shared_lib = shared_library(lib_name, sources,
-- 
2.27.0


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

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-03  6:52 [PATCH] drivers: suggestion on removing empty version.map files Abdullah Ömer Yamaç
2022-10-03  9:19 ` Bruce Richardson
2022-10-03 13:59   ` Omer Yamac
2022-10-03 14:01     ` Bruce Richardson
2022-10-04  6:30       ` Omer Yamac
2022-10-04  8:07         ` Bruce Richardson
2022-10-06  7:19           ` [PATCH 1/2] drivers: suggestion on meson without version file Abdullah Ömer Yamaç
2022-10-06  7:19             ` [PATCH 2/2] drivers: remove the unnecessary version.map Abdullah Ömer Yamaç
2022-10-07 10:30             ` [PATCH 1/2] drivers: suggestion on meson without version file Bruce Richardson
2022-10-10  7:41               ` Omer Yamac
2022-10-10  8:34                 ` Bruce Richardson
2022-10-11 11:08                   ` [PATCH v2 1/2] build: make version file optional for drivers Abdullah Ömer Yamaç
2022-10-11 11:08                     ` [PATCH v2 2/2] drivers: remove the unnecessary version.map Abdullah Ömer Yamaç
2022-10-11 13:10                       ` David Marchand
2022-10-11 19:21                         ` Omer Yamac
2022-10-12 10:29                           ` Abdullah Ömer Yamaç [this message]
2022-10-12 10:29                             ` [PATCH v3 2/2] build: make version file optional for drivers Abdullah Ömer Yamaç
2022-10-12 10:42                               ` [PATCH v4 1/2] " Abdullah Ömer Yamaç
2022-10-12 10:42                                 ` [PATCH v4 2/2] drivers: remove the unnecessary Abdullah Ömer Yamaç
2022-10-12 11:32                                 ` [PATCH v4 1/2] build: make version file optional for drivers Ferruh Yigit
2022-11-14 14:19                                   ` David Marchand
2022-10-11 12:00                     ` [PATCH v2 " Bruce Richardson

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=20221012102954.180722-1-omer.yamac@ceng.metu.edu.tr \
    --to=omer.yamac@ceng.metu.edu.tr \
    --cc=bruce.richardson@intel.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).