On Thu, 31 Mar 2022 21:54:35 -0700 Mahdi Rakhshandehroo <mahdi.rakhshandeh...@gmail.com> wrote:
> Currently, building DPDK with clang + LTO is unsupported, which is a > showstopper for cross-language interprocedural optimizations. The root > cause is that pmdinfogen expects to scan through the section headers of > generated ELF object files, but clang's "-flto" flag generates LLVM > bitcode instead. This patch enables LTO builds with clang, provided that > the linker is set to lld. > > The mechanism of action is clang's "-fembed-bitcode" flag, which acts > similarly to gcc's "-ffat-lto-objects" - the compiler outputs a normal > ELF object file that keeps pmdinfogen happy, but also embeds IR bitcode > in a special section of the ELF that lld can then use to construct the > final binary. > > Signed-off-by: Mahdi Rakhshandehroo <mahdi.rakhshandeh...@gmail.com> > --- This patch still has several build failures such as Intel compiler. Please resolve and resubmit