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 39AA242D8C; Thu, 29 Jun 2023 14:48:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 112DC40EDB; Thu, 29 Jun 2023 14:48:54 +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 CEAC9406B7 for ; Thu, 29 Jun 2023 14:48:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688042932; 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=U8AUdcrUjP8Z1KrCsECktPnMhVZ6BwS03b4b22qq/Ug=; b=ecnqIEMrooBhVvZkrcEXVy2Z4pAvbYWOG+0RsQ4UK3Wb5TH6dC10K5+4ABg6U24OV1OWaW b/CGQr1GEMMl9hpnltIe+W764CdlVO63ZQIJsV8sGHKmd3+RNB0wPC2vS9xP3Ega+DpJLS 4uDMhcnT1bYMkdftn02org350z5pv7c= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-395-SNCltRBcMgWZyYyYtjKxRw-1; Thu, 29 Jun 2023 08:48:45 -0400 X-MC-Unique: SNCltRBcMgWZyYyYtjKxRw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2A0C43C01BA4; Thu, 29 Jun 2023 12:48:45 +0000 (UTC) Received: from RHTPC1VM0NT (unknown [10.22.32.232]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7E8F22166B25; Thu, 29 Jun 2023 12:48:44 +0000 (UTC) From: Aaron Conole To: David Marchand Cc: dev@dpdk.org, thomas@monjalon.net, bluca@debian.org, tredaelli@redhat.com, i.maximets@ovn.org, james.r.harris@intel.com, mohammed@hawari.fr, Morten =?utf-8?Q?Br=C3=B8rup?= , Michael Santana , Bruce Richardson , Dave Young Subject: Re: [PATCH v6 1/2] build: select deprecated libraries References: <20230629090459.823130-1-david.marchand@redhat.com> <20230629090459.823130-2-david.marchand@redhat.com> Date: Thu, 29 Jun 2023 08:48:44 -0400 In-Reply-To: <20230629090459.823130-2-david.marchand@redhat.com> (David Marchand's message of "Thu, 29 Jun 2023 11:04:58 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 David Marchand writes: > Rework deprecated libraries selection by introducing a new configuration > option. > > This breaks existing configurations that were relying on disable_libs=3D'= ' > 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 > Acked-by: Morten Br=C3=B8rup > --- Sorry - same comments apply to this as previous w.r.t. doc updates. > Changes since v4: > - changed the option to a list of libraries instead of a global on/off > knob, > - moved all deprecated libs checks under a single block for readability, > > --- > .ci/linux-build.sh | 2 +- > devtools/test-meson-builds.sh | 8 ++++---- > lib/meson.build | 28 ++++++++++++++++++++-------- > meson_options.txt | 4 +++- > 4 files changed, 28 insertions(+), 14 deletions(-) > > diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh > index 45f2729996..e0b62bac90 100755 > --- a/.ci/linux-build.sh > +++ b/.ci/linux-build.sh > @@ -97,7 +97,7 @@ if [ "$MINI" =3D "true" ]; then > OPTS=3D"$OPTS -Denable_drivers=3Dnet/null" > OPTS=3D"$OPTS -Ddisable_libs=3D*" > else > - OPTS=3D"$OPTS -Ddisable_libs=3D" > + OPTS=3D"$OPTS -Denable_deprecated_libs=3D*" > fi > OPTS=3D"$OPTS -Dlibdir=3Dlib" > =20 > diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.s= h > index 84b907d2ea..c41659d28b 100755 > --- a/devtools/test-meson-builds.sh > +++ b/devtools/test-meson-builds.sh > @@ -120,10 +120,10 @@ config () # > =09=09return > =09fi > =09options=3D > -=09# deprecated libs may be disabled by default, so for complete builds = ensure > -=09# no libs are disabled > -=09if ! echo $* | grep -q -- 'disable_libs' ; then > -=09=09options=3D"$options -Ddisable_libs=3D" > +=09# deprecated libs are disabled by default, so for complete builds > +=09# enable them > +=09if ! echo $* | grep -q -- 'enable_deprecated_libs' ; then > +=09=09options=3D"$options -Denable_deprecated_libs=3D*" > =09fi > =09if echo $* | grep -qw -- '--default-library=3Dshared' ; then > =09=09options=3D"$options -Dexamples=3Dall" > diff --git a/lib/meson.build b/lib/meson.build > index fac2f52cad..73afd90b38 100644 > --- a/lib/meson.build > +++ b/lib/meson.build > @@ -93,6 +93,15 @@ dpdk_libs_deprecated +=3D [ > 'kni', > ] > =20 > +enable_deprecated_libs =3D [] > +foreach l:run_command(list_dir_globs, get_option('enable_deprecated_libs= '), > + check: true).stdout().split() > + if not dpdk_libs_deprecated.contains(l) > + continue > + endif > + enable_deprecated_libs +=3D l > +endforeach > + > disabled_libs =3D [] > opt_disabled_libs =3D run_command(list_dir_globs, get_option('disable_li= bs'), > check: true).stdout().split() > @@ -137,16 +146,19 @@ foreach l:libraries > deps +=3D ['eal'] > endif > =20 > - if disabled_libs.contains(l) > - build =3D false > - reason =3D 'explicitly disabled via build config' > - if dpdk_libs_deprecated.contains(l) > - reason +=3D ' (deprecated lib)' > - endif > - else > - if dpdk_libs_deprecated.contains(l) > + if dpdk_libs_deprecated.contains(l) > + if not enable_deprecated_libs.contains(l) > + build =3D false > + reason =3D 'not in enabled deprecated libraries build config= ' > + else > warning('Enabling deprecated library, "@0@"'.format(l)) > endif > + elif disabled_libs.contains(l) > + build =3D false > + reason =3D 'explicitly disabled via build config' > + endif > + > + if build > subdir(l) > endif > if name !=3D l > diff --git a/meson_options.txt b/meson_options.txt > index 82c8297065..839d4266c6 100644 > --- a/meson_options.txt > +++ b/meson_options.txt > @@ -10,7 +10,7 @@ option('disable_apps', type: 'string', value: '', descr= iption: > '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', descr= iption: > +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, de= scription: > '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: 'string', value: '', description: > + 'Comma-separated list of deprecated libraries to explicitly enabl= e.') > 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: