[clang] [lld] [Driver] Default enable LoongArch linker relaxation (PR #111488)
Jinyang He via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 15 18:20:39 PDT 2024
================
@@ -134,6 +134,12 @@ void loongarch::getLoongArchTargetFeatures(const Driver &D,
(!Args.hasArgNoClaim(clang::driver::options::OPT_march_EQ)))
Features.push_back("+lsx");
+ if (Args.hasFlag(options::OPT_mrelax, options::OPT_mno_relax, true)) {
+ Features.push_back("+relax");
+ } else {
+ Features.push_back("-relax");
+ }
+
----------------
MQ-mengqing wrote:
We can omit the braces.
https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements
https://github.com/llvm/llvm-project/pull/111488
More information about the cfe-commits
mailing list