Skip to content

Commit b05cb42

Browse files
committed
[lld][LoongArch] Default disable linker relaxation in LoongArch.
1 parent 9c5001e commit b05cb42

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lld/ELF/Driver.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -1893,6 +1893,10 @@ static void setConfigs(Ctx &ctx, opt::InputArgList &args) {
18931893
ErrAlways(ctx) << "cannot open --why-extract= file " << ctx.arg.whyExtract
18941894
<< ": " << e.message();
18951895
}
1896+
1897+
// Default disable LoongArch linker relaxation.
1898+
if (ctx.arg.emachine == EM_LOONGARCH)
1899+
ctx.arg.relax = args.hasFlag(OPT_relax, OPT_no_relax, false);
18961900
}
18971901

18981902
static bool isFormatBinary(Ctx &ctx, StringRef s) {

0 commit comments

Comments
 (0)