[clang] [lld] [lld][LoongArch] Enable relaxation when --relax option is passed (PR #111488)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 8 20:40:32 PDT 2024


================
@@ -1462,6 +1462,8 @@ template <class ELFT> void Writer<ELFT>::finalizeAddressDependentContent() {
   for (;;) {
     bool changed = ctx.target->needsThunks
                        ? tc.createThunks(pass, ctx.outputSections)
+                   : ctx.arg.emachine == EM_LOONGARCH && !ctx.arg.relax
----------------
MaskRay wrote:

Adding `ctx.arg.relax` to every place is not acceptable. You could change `ctx.arg.relax` to be always false for loongarch, though.

https://github.com/llvm/llvm-project/pull/111488


More information about the cfe-commits mailing list