[clang] [lld] [Driver] Default enable LoongArch linker relaxation (PR #111488)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 16 20:34:20 PDT 2024
ywgrit wrote:
> Personally I hope that `-mrelax` stays
>
> > > How about now?
> >
> >
> > The patch doesn't touch lld, so my suggestion is "[Driver] Default enable LoongArch linker relaxation".
> > Some additional comments:
> >
> > * Do we need to consider the `-gsplit-dwarf` issue [MC: "error: A dwo section may not contain relocations" when building with fission + RISCV64 #56642](https://github.com/llvm/llvm-project/issues/56642) resolved by https://reviews.llvm.org/D130190 ?
> > * The `--no-relax` option should be passed to linker, see [[Clang][RISCV] Forward --no-relax option to linker for RISC-V #76432](https://github.com/llvm/llvm-project/pull/76432)
> > * Pass `-X` to linker to discard a plethora of `.L` symbols due to linker relaxation. See https://reviews.llvm.org/D127826
>
> This is a good summary and there are many reasons that linker relaxation could cause trouble. Therefore, I don't think "matching RISC-V" is a sufficient justification to enable relaxation by default on LoongArch. We need more and without that we should hold off on this patch.
I just read your post about RELAXATION concerns(https://maskray.me/blog/2021-03-14-the-dark-side-of-riscv-linker-relaxation). There are indeed a lot of issues at the moment and I have the following two questions.
1. Do you have any plans for these issues please?
2. How about adding the relaxation feature to LoongArch without turning it on by default(i.e., hold off on this patch)?
https://github.com/llvm/llvm-project/pull/111488
More information about the cfe-commits
mailing list