https://github.com/brad0 created 
https://github.com/llvm/llvm-project/pull/120652

None

>From 9e195c9033c3b314ee67652c54db910bd8bd1756 Mon Sep 17 00:00:00 2001
From: Brad Smith <b...@comstyle.com>
Date: Thu, 19 Dec 2024 18:48:39 -0500
Subject: [PATCH] [Driver][FreeBSD][NFC] Remove some code duplication

---
 clang/lib/Driver/ToolChains/FreeBSD.cpp | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/clang/lib/Driver/ToolChains/FreeBSD.cpp 
b/clang/lib/Driver/ToolChains/FreeBSD.cpp
index be44fc4fe1a84d..88a27e3192827f 100644
--- a/clang/lib/Driver/ToolChains/FreeBSD.cpp
+++ b/clang/lib/Driver/ToolChains/FreeBSD.cpp
@@ -225,13 +225,7 @@ void freebsd::Linker::ConstructJob(Compilation &C, const 
JobAction &JA,
     break;
   }
 
-  if (Triple.isRISCV64()) {
-    CmdArgs.push_back("-X");
-    if (Args.hasArg(options::OPT_mno_relax))
-      CmdArgs.push_back("--no-relax");
-  }
-
-  if (Triple.isLoongArch64()) {
+  if (Triple.isLoongArch64() || Triple.isRISCV64()) {
     CmdArgs.push_back("-X");
     if (Args.hasArg(options::OPT_mno_relax))
       CmdArgs.push_back("--no-relax");

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to