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 B5A17A2E1B for ; Thu, 5 Sep 2019 11:36:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7B3361E96A; Thu, 5 Sep 2019 11:36:26 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id AF4FB1C219 for ; Thu, 5 Sep 2019 11:36:24 +0200 (CEST) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Sep 2019 02:36:23 -0700 X-IronPort-AV: E=Sophos;i="5.64,470,1559545200"; d="scan'208";a="182775409" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.46]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Sep 2019 02:36:22 -0700 Date: Thu, 5 Sep 2019 10:36:18 +0100 From: Bruce Richardson To: Andrzej Ostruszka Cc: dev@dpdk.org, Andrzej Ostruszka Message-ID: <20190905093618.GA1152@bricha3-MOBL.ger.corp.intel.com> References: <20190905093239.27187-1-amo@semihalf.com> <20190905093239.27187-2-amo@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190905093239.27187-2-amo@semihalf.com> User-Agent: Mutt/1.11.4 (2019-03-13) Subject: Re: [dpdk-dev] [PATCH 01/10] build: add an option to enable LTO build 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, Sep 05, 2019 at 11:32:30AM +0200, Andrzej Ostruszka wrote: > This patch adds an option to enable link time optimization. In addition > to LTO option itself (-flto) fat-lto-objects are being used. This is > because during the build pmdinfogen scans the generated ELF objects to > find this_pmd_name* symbol in symbol table. Without fat-lto-objects gcc > produces ELF only with extra symbols for internal use during linking and > clang does not produce ELF at all (only LLVM IR bitcode). > > Signed-off-by: Andrzej Ostruszka > --- > --- a/meson_options.txt > +++ b/meson_options.txt > @@ -6,6 +6,8 @@ option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-', > description: 'Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory.') > option('enable_docs', type: 'boolean', value: false, > description: 'build documentation') > +option('enable_lto', type: 'boolean', value: false, > + description: 'Enable link time optimization') > option('enable_kmods', type: 'boolean', value: true, > description: 'build kernel modules') > option('examples', type: 'string', value: '', Should not need a new option here. There is already a built-in option "b_lto" which we can reuse. /Bruce