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 CD36343E78; Mon, 15 Apr 2024 11:55:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 976984026C; Mon, 15 Apr 2024 11:55:47 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by mails.dpdk.org (Postfix) with ESMTP id 297FB400EF for ; Mon, 15 Apr 2024 11:55:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713174946; x=1744710946; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=wt2LLmf64QjjjA14WUENwZsF3kE7JYc9SF4IvVC8ysg=; b=Qqd/fxP0en7VktNmK5LjdfEKZVTNOXlvcBx6B5n10JxeYrsHd9jXOS/+ WswtowyPgbCF5SNrOhHdhNMhzJfGfeKP6hbvm9r3B3dlfSLqKfMvYxybx e6TQXfdh19CrTJHTvSiysTXBq6BbUME6iuMZhd6veuhz4gBUKPa8pC+q1 46dqDyxUsXjN2Y9eK6Lm+NQ6yjjtE7tOgdGKmYO6jvcGtqW8k0dQqOXOl +klpbGbhocGfoq82Qbs5J6fhZyU3hEJ7yHcUZRDNZsRd4wBwPflPIryIp jmpYMqN1xB0zRjX6vq7ZOx0vZFAuFSd201t+Qv8lPd5fH7/VHh+Gi711o A==; X-CSE-ConnectionGUID: 52NrBz9PQ52Do+IGLk9zCg== X-CSE-MsgGUID: 53N+EKunSR6Ks26bV9OiRw== X-IronPort-AV: E=McAfee;i="6600,9927,11044"; a="19977205" X-IronPort-AV: E=Sophos;i="6.07,202,1708416000"; d="scan'208";a="19977205" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2024 02:55:45 -0700 X-CSE-ConnectionGUID: DFmN+7u9Rn6czZzTWQf0Og== X-CSE-MsgGUID: OLOvXvmlSQCe7T88M6B0iA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,202,1708416000"; d="scan'208";a="22290245" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orviesa006.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 15 Apr 2024 02:55:45 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 15 Apr 2024 02:55:44 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Mon, 15 Apr 2024 02:55:44 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.168) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 15 Apr 2024 02:55:43 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c3U0kynTuiXrsrBkzSUw+hfV3JcMh37rQAFJ67BYk7GOJ8pMHPdl3aFKdyFrW0p++HEGDUgiIG80XfDxB86erMwE5mHqoz7JYAhQYv1g/kkOVJn1QCSxlm6sPE0kAL3lRfRajp3a9QW9x7W8ac41XlxZVqIbtaDC0OHlGgPfM++yT58SR7nzSXcUsMnR3MfMSAVs0VbHCtvaU2I7S44aIpxkTAlfKyzWOilQxntggYRmORGTWEMz2gOklikZJVeJfY8EfGlz6ExjbFB8Z2oAm5F7z4vL6JtwCW9VZ8RmP+f4j9HKhvY2m5mxJvUH7MaTAAjM1JRmVHUtlhIuP6FSDA== 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=NXz/mEiWDfA+IuwViporRUuQMX8eAK4dwGGJED+ildc=; b=Nd7X/GBKeaOklmIVR7YEB+RlHLLRQqtMoifA7VgXmJtUvJv5ndofAjcpIzs676HR+uikUcQiscXS0ci5KEDVSLPuIxhob6kQ93p965zFg87EbJrChAvVjstL/WnxUvTD5GW9qY14rESDmg+nT+KhzaInnc/zX9SAZuYF2+ZMLmLO+SkbCsKMqV2p5xJ8LjFFa0nROK8mpzzY8+LUW+GYSoBhQlaOYfMZ0QmyAaYu3jUm6Ze3gElsWHv/0fIlwiejwj59CX7RN9SOW+FH01L/I5loDNvYBZaM3gilRIhLghXzJszcdd3MWYMe/EJy3ACLLOlDyXWX+36KZWfB2Z3IWA== 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 CY8PR11MB7687.namprd11.prod.outlook.com (2603:10b6:930:74::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.31; Mon, 15 Apr 2024 09:55:42 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::487e:e20c:ad88:9c0f]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::487e:e20c:ad88:9c0f%7]) with mapi id 15.20.7472.025; Mon, 15 Apr 2024 09:55:42 +0000 Date: Mon, 15 Apr 2024 10:55:37 +0100 From: Bruce Richardson To: Tyler Retzlaff CC: , Harman Kalra Subject: Re: [PATCH v3 1/2] build: build only one library type on Windows Message-ID: References: <1710445477-23848-1-git-send-email-roretzla@linux.microsoft.com> <1712962333-14355-1-git-send-email-roretzla@linux.microsoft.com> <1712962333-14355-2-git-send-email-roretzla@linux.microsoft.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1712962333-14355-2-git-send-email-roretzla@linux.microsoft.com> X-ClientProxiedBy: PR1P264CA0151.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:346::13) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|CY8PR11MB7687:EE_ X-MS-Office365-Filtering-Correlation-Id: 1cfb9f26-05fb-4500-a22d-08dc5d323622 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mfsSX/yEA83dDaQPNiuHKgdsSNVcTpDJ0IPQnMocVCDXvFOMNIC+PO9O0tGxWN2uHm2JBEc2y/5tdFFWnYF5qE7AyDSUaVubCsuhTNDqgmW4JfWqvxafaLza4Ii6Mf0u6p/RdPp96ttIeQRlbCXmYlm0s9bdJ8W9DwSZvy4P+SxC1G8+0b6+HRqo6JZVYkg6MhA4QN3mb/oZYp1asII2+MhYL0Ytr2E6YY7lfOTs+P4bv78aso3OuWY0bGyW1gM3qWq9OMtxtBYpr1ygVCIT2OdGOSfRc+xsfAU7eJhrfQtUS+7Ag1nT+SdcqBT1lzhP5usvz+2+yTYg9WzgQO7SsldS0joh8rWp0TSHchHGh/OHOtUST5oas9CNuqnXP5Mq/1+U3rBvo+yzrbZbvRDZFhfB1c7nwzmONEWLkbAJV0BQSicKIRfVrk/GKrlR+nsNh8fyb2+eKSIR+XfkA5lBlWKzAsx9/rodUZaZ5Ew0Yt7wHsGSi4LBhcLPSYGJTFc+vIjqfh3MRMoMApqcLzU3L12AgwQfAtdFXKqhXrmNqvHxlDKfFWVxtaoOtvuVwYOcc8ffk6vnNmXqTncAl2q9GNerQ6gCLqSmC842DlLedAEixR9vEl5uRkypJL2x7gpvAQFCJCrX5Ya0+0odQXkkk7OyikEahPKg9rAPgqhpZcs= 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)(1800799015)(376005)(366007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?IxqeeQOnqu4O46b+u5NrISThP3UzFX69lSTYAbNhcOsyA6Ib7DAT0E6xV+O2?= =?us-ascii?Q?WKNEvhk++9qCSljprsSL4EreBGgyK0i9CJUrwgVR18fIMCxjWCLsNXyd/u11?= =?us-ascii?Q?IpGteHBbdYIw8r/VFbiDbuHXS7NUXnptu/tt/cc4LBVuOloGQSB3yFks9UQt?= =?us-ascii?Q?lvJ71d/gJ6Bf4gvStTJusLfO+ox0UNbN2PKDu2BsWgP+5RqnPBjeXjrPStr9?= =?us-ascii?Q?FpjnJiIZ01lVgMOFaWMIU2f4uAAkIehb4CGtkLMbiFqzgGFyl3hjOYQ7/Gjk?= =?us-ascii?Q?ZCYIfBei0TDdEprTAhTPik25I82ovKwAolcOoADvYZv7KiNtAN0yrdDKTQGy?= =?us-ascii?Q?0zkmu6ZlhIHYvxR56K3RjEAiHR95ijryd6eIWBU9QN/Nvp1jLvbOiJxvMhb9?= =?us-ascii?Q?p+b9mLTcAV+GKD6M6pTYuurv2fhCfxpRfxxNMgd8p3yVRveVFaZmuK4K7ise?= =?us-ascii?Q?Ha06rQZnDSbMAW0X52M293J58+2hQ/U5U/BVr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7dVmeAzRpDp8wW021NX7cEbul6X32XnAlI0A/S4J/SP8KgAotPjaycWQ9?= =?us-ascii?Q?VVoEy8sbcYALhWQR9BqruKZjxUbqpypgOyU0AWPdVFNkgjfkCxVAWqBioiEG?= =?us-ascii?Q?iNuT415il6aQ1UVar5TEYBSpO9VZf4H8qszW7pOgKqXldEUZKAMhhZj2D92t?= =?us-ascii?Q?hui02aYTDTWhU8kvIbcBlhS5AfTkMqchawkEPi/pKn+UbKkDTmqVlg/jM781?= =?us-ascii?Q?fQ=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 1cfb9f26-05fb-4500-a22d-08dc5d323622 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2024 09:55:41.9864 (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: Jbl2z7SyaaviouoneK0PS4I+RVcXA35fI0paT75+QYHuvkFmBxRERIJtB4zoMiztb9jy+5RClHbbG9lyzT38Qla6vWW8PJcal/YEFOLQMIE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR11MB7687 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 Fri, Apr 12, 2024 at 03:52:12PM -0700, Tyler Retzlaff wrote: > MSVC is the only compiler that can produce usable shared libraries for > DPDK on Windows because of the use of exported TLS variables. > > Disable building of shared libraries with LLVM and MinGW so that > remaining __declspec macros needed for the functional libraries built by > MSVC can be used without triggering errors in LLVM and MinGW builds. > > For Windows only install the default_library type to avoid confusion. > Windows builds cannot build both shared and static in a single pass so > install only the functional variant. > > Signed-off-by: Tyler Retzlaff > --- > app/meson.build | 6 +++ > config/meson.build | 20 ++++++++++ > drivers/meson.build | 64 +++++++++++++++---------------- > drivers/net/octeontx/base/meson.build | 2 +- > examples/meson.build | 6 +++ > lib/meson.build | 72 +++++++++++++++-------------------- > 6 files changed, 94 insertions(+), 76 deletions(-) > > - > - # create a dependency object and add it to the global dictionary so > - # testpmd or other built-in apps can find it if necessary > - shared_dep = declare_dependency(link_with: shared_lib, > - include_directories: includes, > - dependencies: shared_deps) > + if is_shared_enabled > + shared_lib = shared_library(lib_name, sources, > + objects: objs, > + include_directories: includes, > + dependencies: shared_deps, > + c_args: cflags, > + link_args: lk_args, > + link_depends: lk_deps, > + version: abi_version, > + soversion: so_version, > + install: install_shared, > + install_dir: driver_install_path) > + > + # create a dependency object and add it to the global dictionary so > + # testpmd or other built-in apps can find it if necessary > + shared_dep = declare_dependency(link_with: shared_lib, > + include_directories: includes, > + dependencies: shared_deps) > + > + else > + shared_dep = {} > + endif Very minor nit, but it's generally easier to follow code where you put the short leg of the condition first, and then the longer leg. Having the short leg (in this case the one-line) first means the reader has no difficulty remembering what the original condition was, once they get to the "else". The longer leg requires more attention and having it last means the reader doesn't need to worry about maintaining the context of the "if" in memory. [To a certain extent this is just user-preference, so feel free to ignore this comment if it's too much work! :-)] > static_dep = declare_dependency( > include_directories: includes, > dependencies: static_deps) > diff --git a/drivers/net/octeontx/base/meson.build b/drivers/net/octeontx/base/meson.build > index 8e5e8c1..a793c19 100644 > --- a/drivers/net/octeontx/base/meson.build > +++ b/drivers/net/octeontx/base/meson.build > @@ -10,7 +10,7 @@ sources = [ > depends = ['ethdev', 'mempool_octeontx'] > static_objs = [] > foreach d: depends > - if not is_variable('shared_rte_' + d) > + if not is_variable('static_rte_' + d) Since we have empty objects defined for the shared vars in the no-shared case, you can drop this change. > subdir_done() > endif > static_objs += get_variable('static_rte_' + d)