================
@@ -2129,6 +2129,16 @@ void Clang::AddRISCVTargetArgs(const ArgList &Args,
           << A->getSpelling() << Val;
     }
   }
+
+  // Forward the -mglobal-merge option for explicit control over the pass.
+  if (Arg *A = Args.getLastArg(options::OPT_mglobal_merge,
+                               options::OPT_mno_global_merge)) {
+    CmdArgs.push_back("-mllvm");
----------------
MaskRay wrote:

I know that you are copying arm/aarch64, but for new code for a boolean option 
(sometimes called flag), we use a convention to only pass a non-default option 
to cc1.

Since `-riscv-enable-global-merge` defaults to 0, we only pass `-mllvm 
-riscv-enable-global-merge` to cc1 (remove `=true`).

https://github.com/llvm/llvm-project/pull/79372
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to