[clang] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BS… (PR #83216)

via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 27 18:12:48 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff bfcf7a0707592ccc7fd9e805aeb36c4da3f315a6 e9dca00cb002d223b4148d648f4f31b4cfc31d63 -- clang/lib/Driver/ToolChains/FreeBSD.cpp clang/lib/Driver/ToolChains/Haiku.cpp clang/lib/Driver/ToolChains/NetBSD.cpp clang/lib/Driver/ToolChains/OpenBSD.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/Driver/ToolChains/Haiku.cpp b/clang/lib/Driver/ToolChains/Haiku.cpp
index 6919a8dd0d..7db197d198 100644
--- a/clang/lib/Driver/ToolChains/Haiku.cpp
+++ b/clang/lib/Driver/ToolChains/Haiku.cpp
@@ -64,7 +64,7 @@ void haiku::Linker::ConstructJob(Compilation &C, const JobAction &JA,
   if (Triple.isRISCV64()) {
     CmdArgs.push_back("-X");
     if (Args.hasArg(options::OPT_mno_relax))
-     CmdArgs.push_back("--no-relax");
+      CmdArgs.push_back("--no-relax");
   }
 
   assert((Output.isFilename() || Output.isNothing()) && "Invalid output.");

``````````

</details>


https://github.com/llvm/llvm-project/pull/83216


More information about the cfe-commits mailing list