From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A51A2A057B; Mon, 30 Mar 2020 15:52:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0DDA32BEA; Mon, 30 Mar 2020 15:52:51 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 5141A2B8B for ; Mon, 30 Mar 2020 15:52:49 +0200 (CEST) IronPort-SDR: PZMeq1ndTCNrRrjzIPLolQ1Gr6LMSTRFKx2nO8iPzrYm3LRngFpyMFyICOyIpOzzWfKHD4ltMc QkguZVE82D8A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2020 06:52:48 -0700 IronPort-SDR: ZlzAC6O5ifK/6+5sDKLV2eqr9UOH3wMhv6jLwuswdH0DSUyJmg5rbs85SpFv6RSt5vRZPEm1Lh 5i+0SYpXJ1aA== X-IronPort-AV: E=Sophos;i="5.72,324,1580803200"; d="scan'208";a="242034723" Received: from bricha3-mobl.ger.corp.intel.com ([10.214.232.198]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 30 Mar 2020 06:52:46 -0700 Date: Mon, 30 Mar 2020 14:52:38 +0100 From: Bruce Richardson To: Darek Stojaczyk Cc: dev@dpdk.org Message-ID: <20200330135238.GB132@bricha3-MOBL.ger.corp.intel.com> References: <20200326092259.33957-1-dariusz.stojaczyk@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200326092259.33957-1-dariusz.stojaczyk@intel.com> Subject: Re: [dpdk-dev] [PATCH] build: don't parse build configs of explicitly disabled drivers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Mar 26, 2020 at 10:22:59AM +0100, Darek Stojaczyk wrote: > Even when a PMD was disabled with meson's disable_drivers option > its config file was still being parsed. Some of the PMD configs > attempt to find a library they depend on and parse its header files > with certain assumptions. If the library is found, but it's simply > too old to contain the necessary header files, the meson build > fails and it can only be fixed by either updating that library, or > expanding the meson script for the faulty PMD. > > While the latter should be still done for the sake of DPDK quality, > an intermediate solution would be to skip building the faulty PMD > - there's a chance we don't need it. That's what this patch allows. > > Signed-off-by: Darek Stojaczyk > --- > drivers/meson.build | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/meson.build b/drivers/meson.build > index 5502bf9924..a13c62a3b0 100644 > --- a/drivers/meson.build > +++ b/drivers/meson.build > @@ -60,9 +60,6 @@ foreach class:dpdk_driver_classes > ext_deps = [] > pkgconfig_extra_libs = [] > > - # pull in driver directory which should assign to each of the above > - subdir(drv_path) > - > # skip disabled drivers. For meson 0.49 change this to use > # "in" keyword > foreach disable_path: disabled_drivers > @@ -71,6 +68,12 @@ foreach class:dpdk_driver_classes > reason = 'Explicitly disabled via build config' > endif > endforeach > + > + if build > + # pull in driver directory which should update all the local variables > + subdir(drv_path) > + endif > + Looking at this code and the meson docs again, I think this block and previous can be simplified by using the array "contains()" method to avoid the loop. if disabled_drivers.contains(drv_path) build = false reson = '....' else # pull in driver ... subdir(drv_path) endif Regards, /Bruce