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 <aostrus...@marvell.com> > --- <snip> > --- a/meson_options.txt > +++ b/meson_options.txt > @@ -6,6 +6,8 @@ option('drivers_install_subdir', type: 'string', value: > 'dpdk/pmds-<VERSION>', > 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