[PATCH] D129401: [libLTO] Set data-sections by default in libLTO for ELF and XCOFF.

Quinn Pham via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 18 09:12:08 PDT 2022


quinnp added a comment.

In D129401#3660001 <https://reviews.llvm.org/D129401#3660001>, @w2yehia wrote:

> In D129401#3655316 <https://reviews.llvm.org/D129401#3655316>, @quinnp wrote:
>
>> I've realized that `getExplicitDataSections()` interacts with ...
>
> Yes, that seems to be the case that clang forwards <https://github.com/llvm/llvm-project/blob/2e91266942509f9cabec925a1a59dab31bd07634/clang/lib/Driver/ToolChains/CommonArgs.cpp#L574> the -data-sections option to libLTO/gold only when it's ON. It might be that at that time teh default was assumed to be OFF in libLTO/gold.
> Users can still disable it by passing the option manually (i.e. `-plugin-opt=-data-sections=0`).
> The forwarding logic in clang shud be fixed at some point.

Ah I see, that makes sense. Thank you Wael!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129401/new/

https://reviews.llvm.org/D129401



More information about the llvm-commits mailing list