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 C11A643728; Wed, 20 Dec 2023 16:43:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B0F5B40685; Wed, 20 Dec 2023 16:43:49 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 3E70740291 for ; Wed, 20 Dec 2023 16:43:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703087027; x=1734623027; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=iWPJWm71vqOOnmSbocBXhVBIARf6xVj7/MoUMiGImZg=; b=VPoRNrz4hajLTrZneOy8lXOWA7FjjL38fbn5tJ8m1gFBbE1ywW54e/VM 3NnEK6Dq3EHJ1hXK/tAU9qsZnrvELADmff2D9jXIUL7sR0bQuvsWythGK Y91I9ef4YJkCAkXJpRyB7cWeRu2xZlZIpiONIEizIXBNpi2Booqz64Kzh iY6/NAwhx4f7IgjIiLrKXfQxejck/eOz/4FXIK5h3ylyqktuaRhvtjhei u2gQdVQ117ioThHN4QDK93Ki5a/2IU/XfIkvse3GkwSLJDHfRrm3DrPg9 ocdFmaRFuEgT4ICYfDt3qK/ZxFCOfLORK47Yepf6GIeHAWe4DZrmD08wG g==; X-IronPort-AV: E=McAfee;i="6600,9927,10930"; a="460174545" X-IronPort-AV: E=Sophos;i="6.04,291,1695711600"; d="scan'208";a="460174545" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2023 07:43:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10930"; a="769624407" X-IronPort-AV: E=Sophos;i="6.04,291,1695711600"; d="scan'208";a="769624407" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga007.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 20 Dec 2023 07:43:46 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 20 Dec 2023 07:43:45 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 20 Dec 2023 07:43:45 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Wed, 20 Dec 2023 07:43:45 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.101) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 20 Dec 2023 07:43:43 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IYI2IRxdwkwNHoWoWOWqIy4fvymvit8Q+kt9m8DUg2jsD99FLsj1jxbh90wM+avakO049gGcbbiY9/8dlufWBg/EIKUDqk2QyzhJ53hIUA7vo752PupLSjJ3hISl+RXsDd2Wws4E9jjAHB3gB1VYuW3XLgeDGJyPnuEchp4UcrIct0Y6g+dHCpTWvxlNcEmVaH7kBE7UlZQpfMZZpVRWuJO5dshtcxWz4Wd304z6FvKkQUFvD4WpAouadwLg2PTRmcvvIgmk3I+emuH5RgMu1wSJx879+zRTsV0HaNfNb01KqzbVnm/c/swaxMKrjPoJItXKKMi2pZ+SugWQZf191Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=i1guRTZ+ybVRGSy985jdMqaJ840MIriUd/4UBkiDCxY=; b=Jc1spc7WlYYGTcvLnpfgKB2Ppf1zjrmFcs8iLv6BUrurwxYFGgTVyj7JaXt5VnVOki81WeBsnLWqCRNcB6jUSdarsSlLqqmqPK7XXe2TJ0BSXJ4ip5nuLZcnoGXb3BLCGl2f5P2m1ozsjMSDh0xly9BPCjiH3+3dSRetIONFowg4mfahFJxJvCVYAUX54AbZ8mi3AAgIcFD0bJahtXaLW54ltImGSh8QX3I7m9XrFZqGgxMTFrF2JK+BoF5dxQz2NRO4CCuecwvJDea6e5Iq7F0ghXPnP+un11P5qv63mfogYR3ai+FoyXIPuXDoy7+vtvV64FG3K0oaSAAtsTvXhA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by DS7PR11MB6040.namprd11.prod.outlook.com (2603:10b6:8:77::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.38; Wed, 20 Dec 2023 15:43:42 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::4782:d54a:209d:cb49]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::4782:d54a:209d:cb49%7]) with mapi id 15.20.7113.016; Wed, 20 Dec 2023 15:43:42 +0000 Date: Wed, 20 Dec 2023 15:43:36 +0000 From: Bruce Richardson To: Morten =?iso-8859-1?Q?Br=F8rup?= CC: Subject: Re: [PATCH v3 3/3] build: RFC - add support for optional dependencies Message-ID: References: <20231103162830.593702-1-bruce.richardson@intel.com> <20231220142152.492556-1-bruce.richardson@intel.com> <20231220142152.492556-4-bruce.richardson@intel.com> <98CBD80474FA8B44BF855DF32C47DC35E9F0E8@smartserver.smartshare.dk> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F0E8@smartserver.smartshare.dk> X-ClientProxiedBy: DU6P191CA0052.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:53e::12) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|DS7PR11MB6040:EE_ X-MS-Office365-Filtering-Correlation-Id: 45ca657e-06b8-414f-69e7-08dc01727151 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fC66OVwFbXLjsjxO3r6UD5ZMiOIgUYlcvNUnRv81Bp4O1et5FhGt9cpQmjXHOzvKL07WguL9YgJhUdg161/Nwj7luRNcc7wRWdKfwILljsW1qy3ilcNNh0nbmmpLjo7ogzJFW6PFECgY0DgqKPPEDx9ocW+Ju8UTnVehsmfRXz7CnoD/d2CBEL3l3y22lyiV1USugU5OMkOQqY3ZYvxxLCNZLeH1VPRLOqXhTjzCYoqDEcWVi3D43SpG5PWwVEq6gVOzHUEPFEs/3akpEhjTZT8MPl5xsgtJqNfwrh2PkA7lsMAGz2Q7b1E4qU2q9Ws9wBtpS5mkkgYdVYIQdqr9z33gp5zpda/4eAYw4dAPq0HZbbf0Meqrjul8fQJnmCEUE4sX8QGLNaYSYejncoxbhaan20pd/GqQ7MLOLz/C8+TCUCLZOtnYjnyYtyg7kKXeXbM62KmaKLnYg/71MQeDNltLDn92ntOE277YuqkZycPEyBOY30dZaGkJf6HmHg9cDcrlgSOGXKOT9A0getni+oPiBS8rmzclGwi/bhWFtLIJTFm369uiVcZDUn0DYu/r X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(366004)(376002)(39860400002)(136003)(346002)(230922051799003)(451199024)(186009)(64100799003)(1800799012)(6486002)(478600001)(6512007)(66476007)(66556008)(83380400001)(6666004)(66574015)(6916009)(66946007)(316002)(8936002)(8676002)(5660300002)(44832011)(4326008)(26005)(6506007)(41300700001)(2906002)(82960400001)(86362001)(38100700002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?vlnUWklZUN9m4rmjzoqxN0a1s3jSCOnZTQduoUkw/69mP6Yknzn+zW9HAD?= =?iso-8859-1?Q?3BGrsga36+Q1cCbtDvRUpiOaQEYIwXSsYXOCZwLIOqoUWe/DqaXa1QzT6D?= =?iso-8859-1?Q?vhCDkXtXcsaVyz4/vwN4ltVNYlpe2a3miBcPgkbNp1YetuMfn48mZFB1K+?= =?iso-8859-1?Q?6U5TErNy6PschwX+VAuiWr0miaQ+D7SDSz+Pz9l6uTNAnWz99zGGtMBHsi?= =?iso-8859-1?Q?uQ1UUYUdWkfys5MN4edr39tt7+wKjVkgW2Dsdi+rtbC6HyXIAKLHnk6QMK?= =?iso-8859-1?Q?YhhhMcFNRgthgAJRwqkyOL4SVuzn17/QJbN96/xiVielk/cpJmmJeNdYfu?= =?iso-8859-1?Q?SlXb8O1dG0qgvRuPB/ovWudNuUAHIw/52jhOC7bnKc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V0q5kuRT6PU0mI6ZIo5zD5A8dRfhscrWHn8LfbC355EIJ?= =?iso-8859-1?Q?PGlnwjj8Pk2cmuyJE+FgCRs34lbmP0pgmXHONSAA4FmdxOYrL6BrG9xbAc?= =?iso-8859-1?Q?ucHHvSb+4aUPmBz/bMeRf4u/7E0cMfvdN9a94YBBfrAapQGNLGD0ffXd4v?= =?iso-8859-1?Q?xSDz1CbSbpbeLW9OVX6r9iG5MukN6MMKD1VsK/y6kZ1Fz/Pzzk6ClXq2fb?= =?iso-8859-1?Q?IRKeW/G5Fz5Cu1OBAtvliFd9iacoMHl16Ki0CXr1K3tRZJdLuVD7O5FsZU?= =?iso-8859-1?Q?UFIYMnT1G9GiH3BcZns1TKhClu6+pqwnEoSTIV239AlkojWerUa8eto/ZW?= =?iso-8859-1?Q?N0Ehm54nEHaMGhMAUmoyb5U94NNasB9krAuqIWIuYvPlICDFbR6u94Vg?= =?iso-8859-1?Q?=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 45ca657e-06b8-414f-69e7-08dc01727151 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2023 15:43:42.1397 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: CxPOMtfIDyuFI7mT4KCoY7vQwj/hG9RRPsdmn6b2Z79iIJuvw9WwU6vDJT8b2tIrCZld0xi6D53ya2aiAlt7hBjatfptTRR23aX3JngN3mA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB6040 X-OriginatorOrg: intel.com 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 On Wed, Dec 20, 2023 at 04:08:08PM +0100, Morten Brørup wrote: > > From: Bruce Richardson [mailto:bruce.richardson@intel.com] > > Sent: Wednesday, 20 December 2023 15.22 > > > > In order to remove more libraries from the mandatory list, we need to > > have support for optionally having a dependency from a driver or > > library > > to another driver or lib. This patch adds this support by adding a new > > optional_deps variable, the contents of which are added to the deps > > list > > if those optional dependencies are present in the build. > > > > Signed-off-by: Bruce Richardson > > --- > > drivers/meson.build | 7 +++++++ > > lib/meson.build | 7 +++++++ > > 2 files changed, 14 insertions(+) > > > > diff --git a/drivers/meson.build b/drivers/meson.build > > index 5ba534049a..af2d8da5a8 100644 > > --- a/drivers/meson.build > > +++ b/drivers/meson.build > > @@ -127,6 +127,7 @@ foreach subpath:subdirs > > includes = [include_directories(drv_path)] > > # set up internal deps. Drivers can append/override as > > necessary > > deps = std_deps > > + optional_deps = [] > > (I'm a meson noob, so please bear with my stupid questions.) > > Is a separate "optional_deps" necessary? If a driver has any of these dependencies, why can it not just add them to the "deps" in the driver's meson.build file? > > Ohhh... It's the other way around: The driver only depends on the other (optional) lib if that other lib is enabled! Correct? > Yes, it's a shortcut to save an app having to manually check for its optional dependency itself in the meson.build file. However, this is only really useful if it's an optional dependency where we just have #ifdefs in the C code for it. For the initial example I was thinking of to try and use it - meter lib in ethdev - something that simple is not enough. So long as there are extra C files or headers that need to be built when a dependency is present, we need to change the meson.build file to explicitly check anyway. Hence it's only an RFC until such time as we find a use-case or two that uses it. /Bruce