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 24FBBA00C5; Thu, 1 Dec 2022 11:09:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED1ED42D1D; Thu, 1 Dec 2022 11:09:18 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 383FD42D0D for ; Thu, 1 Dec 2022 11:09:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669889356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lrZi0jQV8Fv3IibKA52su8egA5/U9Nfaj5fKrmIgb4M=; b=YmspeIh38SVi7HqtpSD/wMMJ+lzDAwitdR2ea6MwGX0Gg89c8K+J8NVPn4hL+al+WUV5cY qsWUk01DHFnZVCACa1V8j6d4fc4cA1Z9DyYURs+nNmDYm5y86RponZ6Ow0Mma/B2ssI3LX Trla5/U929O4oPYMQTfydiCpZFtr2QE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-120-cJdn-bsdOe-lPSqXgvSmmg-1; Thu, 01 Dec 2022 05:09:15 -0500 X-MC-Unique: cJdn-bsdOe-lPSqXgvSmmg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2E906800186; Thu, 1 Dec 2022 10:09:15 +0000 (UTC) Received: from localhost.localdomain (ovpn-192-86.brq.redhat.com [10.40.192.86]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8075E47505E; Thu, 1 Dec 2022 10:09:14 +0000 (UTC) From: David Marchand 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 Message-Id: <20221201100847.322141-2-david.marchand@redhat.com> In-Reply-To: <20221201100847.322141-1-david.marchand@redhat.com> References: <20221129140032.35940-1-david.marchand@redhat.com> <20221201100847.322141-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 We have been generating some Windows and mingw artefacts on all OS while there is no need for them. Signed-off-by: David Marchand --- 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