[lld][LoongArch] Default disable linker relaxation in LoongArch.#123017
[lld][LoongArch] Default disable linker relaxation in LoongArch.#123017ylzsx wants to merge 1 commit into
Conversation
|
@llvm/pr-subscribers-backend-loongarch @llvm/pr-subscribers-lld Author: Zhaoxin Yang (ylzsx) ChangesIn the upcoming patches, we will add support for relaxation in LoongArch. However, it will remain disabled by default. After sufficient testing, we will enable it by default. Full diff: https://github.com/llvm/llvm-project/pull/123017.diff 1 Files Affected:
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index 13e8f8ce6df207..71aa291c05de11 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -1893,6 +1893,10 @@ static void setConfigs(Ctx &ctx, opt::InputArgList &args) {
ErrAlways(ctx) << "cannot open --why-extract= file " << ctx.arg.whyExtract
<< ": " << e.message();
}
+
+ // Default disable LoongArch linker relaxation
+ if (ctx.arg.emachine == EM_LOONGARCH)
+ ctx.arg.relax = args.hasFlag(OPT_relax, OPT_no_relax, false);
}
static bool isFormatBinary(Ctx &ctx, StringRef s) {
|
11e4481 to
b05cb42
Compare
MaskRay
left a comment
There was a problem hiding this comment.
This is not needed before relaxation is implemented for LoongArch.
We have completed the corresponding code and performed preliminary testing (Linux, llvm-test-suite, etc.), with approximately 8 patches. One of them is #122209. |
Dependency on llvm#123017
I plan to push the 8 patches as PRs for review by colleagues within the next couple of days. Do you think the current patches( |
Dependency on llvm#123017
In the upcoming patches, we will add support for relaxation in LoongArch. However, it will remain disabled by default. After sufficient testing, we will enable it by default.