[clang] [Clang] Make the GPU toolchains implicitly link `-lm` and `-lc` (PR #98170)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 9 08:31:07 PDT 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 221d5c570c2ad0201d808b889280ef71b80c1845 d86b888d4ffcad276ffcc7df8fd7ede7645f7f3c -- clang/test/Driver/nvlink-wrapper.c clang/tools/clang-nvlink-wrapper/ClangNVLinkWrapper.cpp clang/lib/Driver/ToolChains/AMDGPU.cpp clang/lib/Driver/ToolChains/CommonArgs.cpp clang/lib/Driver/ToolChains/Cuda.cpp clang/lib/Driver/ToolChains/Cuda.h clang/test/Driver/cuda-cross-compiling.c clang/test/Driver/linker-wrapper-libs.c clang/test/Driver/linker-wrapper.c clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Driver/ToolChains/AMDGPU.cpp b/clang/lib/Driver/ToolChains/AMDGPU.cpp
index 56d06a6f3e..6f39782966 100644
--- a/clang/lib/Driver/ToolChains/AMDGPU.cpp
+++ b/clang/lib/Driver/ToolChains/AMDGPU.cpp
@@ -643,7 +643,7 @@ void amdgpu::Linker::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-lc");
CmdArgs.push_back("-lm");
}
-
+
CmdArgs.push_back("-o");
CmdArgs.push_back(Output.getFilename());
C.addCommand(std::make_unique<Command>(
``````````
</details>
https://github.com/llvm/llvm-project/pull/98170
More information about the cfe-commits
mailing list