-
Notifications
You must be signed in to change notification settings - Fork 13.3k
[lld][LoongArch] Default disable linker relaxation in LoongArch. #123017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.