From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 80CD4A0547; Wed, 12 Oct 2022 12:30:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 58AB443007; Wed, 12 Oct 2022 12:30:13 +0200 (CEST) Received: from guvercin.ceng.metu.edu.tr (guvercin.ceng.metu.edu.tr [144.122.171.43]) by mails.dpdk.org (Postfix) with ESMTP id 986E442B6D for ; Wed, 12 Oct 2022 12:30:08 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by guvercin.ceng.metu.edu.tr (Postfix) with ESMTP id 5A5A22CC35; Wed, 12 Oct 2022 13:30:08 +0300 (+03) X-Virus-Scanned: Debian amavisd-new at ceng.metu.edu.tr Received: from guvercin.ceng.metu.edu.tr ([127.0.0.1]) by localhost (guvercin.ceng.metu.edu.tr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Kn8kPkNxFrs8; Wed, 12 Oct 2022 13:29:58 +0300 (+03) Received: from dmu.otak.ist (unknown [212.156.37.190]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: e1885458) by guvercin.ceng.metu.edu.tr (Postfix) with ESMTPSA id E21FF2C0AE; Wed, 12 Oct 2022 13:29:57 +0300 (+03) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ceng.metu.edu.tr; s=mail; t=1665570598; bh=YiwIN38nyDmJ2SAhlfmEYbTEST9mr0WUOo2RJxqy/Zo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ArFMLSdcSoQ+PuCT+Q+yHH10zic/4Ee5zgxtYuA7+acObNiYfn+DIYy+AIxFpKbG2 thASVdKF6TR0sRNBQuIwbyJiEQpr8BiJq40eGxW+DzGOXTyQaOq9ThovBkZXh3yexh SFapC2l5QToParPjZKXm1HaowoQiW5B4phzI2ta0= From: =?UTF-8?q?Abdullah=20=C3=96mer=20Yama=C3=A7?= To: dev@dpdk.org Cc: =?UTF-8?q?Abdullah=20=C3=96mer=20Yama=C3=A7?= , Ferruh Yigit , Bruce Richardson Subject: [PATCH v3 1/2] build: make version file optional for drivers Date: Wed, 12 Oct 2022 13:29:53 +0300 Message-Id: <20221012102954.180722-1-omer.yamac@ceng.metu.edu.tr> X-Mailer: git-send-email 2.27.0 In-Reply-To: <0e20fb90e9021512cea9d04e5f50473b@ceng.metu.edu.tr> References: <0e20fb90e9021512cea9d04e5f50473b@ceng.metu.edu.tr> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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ç Suggested-by: Ferruh Yigit Series-acked-by: Bruce Richardson --- 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