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 506C342D16; Wed, 21 Jun 2023 19:01:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EBE5D42D12; Wed, 21 Jun 2023 19:01:27 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 76A0042D10 for ; Wed, 21 Jun 2023 19:01:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687366887; 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=5cHBr7/ynbi8Vbabgmho3/X3+HyWHwbvgQgmzxb074E=; b=AzfNMxE5vQjZT3qHRT1WNNLu0ZETMf0UjXJw5GfJIGuh9pOPkgLoKoqyq9thUwJ1rgeN2d D0+2OtIiLzsZVJYynFtV+0e8e0q6eRbiKtc4gF90OO7x/q6fQ9Hm9bLo3W0tskX/44Xypn odUa80fh1SsQ2js3HqiKWKr+m+c0+TA= 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-553-2ROesEk7MQyHt8Ai2fGDCA-1; Wed, 21 Jun 2023 13:01:23 -0400 X-MC-Unique: 2ROesEk7MQyHt8Ai2fGDCA-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 BD04D10311E5; Wed, 21 Jun 2023 17:01:18 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.210]) by smtp.corp.redhat.com (Postfix) with ESMTP id E3D07492B01; Wed, 21 Jun 2023 17:01:16 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, bluca@debian.org, tredaelli@redhat.com, i.maximets@ovn.org, james.r.harris@intel.com, mohammed@hawari.fr, Aaron Conole , Michael Santana , Bruce Richardson Subject: [PATCH v4 3/4] build: select deprecated libraries Date: Wed, 21 Jun 2023 19:00:57 +0200 Message-Id: <20230621170058.2740340-4-david.marchand@redhat.com> In-Reply-To: <20230621170058.2740340-1-david.marchand@redhat.com> References: <20211117112847.7362-6-david.marchand@redhat.com> <20230621170058.2740340-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 Rework deprecated libraries selection by introducing a new configuration option. This breaks existing configurations that were relying on disable_libs='' for enabling deprecated libraries. On the other hand, it will make enabling optional libraries more straightforward by taking the deprecated libraries out of the picture. Signed-off-by: David Marchand --- .ci/linux-build.sh | 2 +- devtools/test-meson-builds.sh | 8 ++++---- lib/meson.build | 9 +++++++-- meson_options.txt | 4 +++- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index 9631e342b5..da51f8e55e 100755 --- a/.ci/linux-build.sh +++ b/.ci/linux-build.sh @@ -97,7 +97,7 @@ if [ "$MINI" = "true" ]; then OPTS="$OPTS -Denable_drivers=net/null" OPTS="$OPTS -Ddisable_libs=*" else - OPTS="$OPTS -Ddisable_libs=" + OPTS="$OPTS -Denable_deprecated_libs=true" fi if [ "$ASAN" = "true" ]; then diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 9131088c9d..efeddb36f3 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -120,10 +120,10 @@ config () # return fi options= - # deprecated libs may be disabled by default, so for complete builds ensure - # no libs are disabled - if ! echo $* | grep -q -- 'disable_libs' ; then - options="$options -Ddisable_libs=" + # deprecated libs are disabled by default, so for complete builds + # enable them + if ! echo $* | grep -q -- 'enable_deprecated_libs' ; then + options="$options -Denable_deprecated_libs=true" fi if echo $* | grep -qw -- '--default-library=shared' ; then options="$options -Dexamples=all" diff --git a/lib/meson.build b/lib/meson.build index 363a4fd79f..a6e9e19b42 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -136,13 +136,18 @@ foreach l:libraries deps += ['eal'] endif - if disabled_libs.contains(l) + if dpdk_libs_deprecated.contains(l) and not get_option('enable_deprecated_libs') + build = false + reason = 'deprecated libraries disabled via build config' + elif disabled_libs.contains(l) build = false reason = 'explicitly disabled via build config' if dpdk_libs_deprecated.contains(l) reason += ' (deprecated lib)' endif - else + endif + + if build if dpdk_libs_deprecated.contains(l) warning('Enabling deprecated library, "@0@"'.format(l)) endif diff --git a/meson_options.txt b/meson_options.txt index 82c8297065..f959015e46 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -10,7 +10,7 @@ option('disable_apps', type: 'string', value: '', description: 'Comma-separated list of apps to explicitly disable.') option('disable_drivers', type: 'string', value: '', description: 'Comma-separated list of drivers to explicitly disable.') -option('disable_libs', type: 'string', value: 'flow_classify,kni', description: +option('disable_libs', type: 'string', value: '', description: 'Comma-separated list of libraries to explicitly disable. [NOTE: not all libs can be disabled]') option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-', description: 'Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory.') @@ -18,6 +18,8 @@ option('enable_docs', type: 'boolean', value: false, description: 'build documentation') option('enable_apps', type: 'string', value: '', description: 'Comma-separated list of apps to build. If unspecified, build all apps.') +option('enable_deprecated_libs', type: 'boolean', value: false, description: + 'Add deprecated libraries to the list of optional libraries to build') option('enable_drivers', type: 'string', value: '', description: 'Comma-separated list of drivers to build. If unspecified, build all drivers.') option('enable_driver_sdk', type: 'boolean', value: false, description: -- 2.40.1