[clang] f7b6dc8 - [Clang] Fix missing `-` in argument to nvlinker
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 18 17:16:59 PDT 2024
Author: Joseph Huber
Date: 2024-10-18T19:16:42-05:00
New Revision: f7b6dc821ad2aa02e027db76f193b85a87443e0b
URL: https://github.com/llvm/llvm-project/commit/f7b6dc821ad2aa02e027db76f193b85a87443e0b
DIFF: https://github.com/llvm/llvm-project/commit/f7b6dc821ad2aa02e027db76f193b85a87443e0b.diff
LOG: [Clang] Fix missing `-` in argument to nvlinker
Added:
Modified:
clang/lib/Driver/ToolChains/Cuda.cpp
clang/test/Driver/cuda-cross-compiling.c
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/Cuda.cpp b/clang/lib/Driver/ToolChains/Cuda.cpp
index e9d2e3fe6d5ce0..412b379304b1e6 100644
--- a/clang/lib/Driver/ToolChains/Cuda.cpp
+++ b/clang/lib/Driver/ToolChains/Cuda.cpp
@@ -635,7 +635,7 @@ void NVPTX::Linker::ConstructJob(Compilation &C, const JobAction &JA,
getNVPTXTargetFeatures(C.getDriver(), getToolChain().getTriple(), Args,
Features);
CmdArgs.push_back(
- Args.MakeArgString("--plugin-opt=mattr=" + llvm::join(Features, ",")));
+ Args.MakeArgString("--plugin-opt=-mattr=" + llvm::join(Features, ",")));
// Add paths for the default clang library path.
SmallString<256> DefaultLibPath =
diff --git a/clang/test/Driver/cuda-cross-compiling.c b/clang/test/Driver/cuda-cross-compiling.c
index 54c291fac66ffd..126e9e9fc83d57 100644
--- a/clang/test/Driver/cuda-cross-compiling.c
+++ b/clang/test/Driver/cuda-cross-compiling.c
@@ -104,4 +104,4 @@
// RUN: %clang -target nvptx64-nvidia-cuda --cuda-feature=+ptx63 -march=sm_52 -### %s 2>&1 \
// RUN: | FileCheck -check-prefix=FEATURE %s
-// FEATURE: clang-nvlink-wrapper{{.*}}"--plugin-opt=mattr=+ptx63"
+// FEATURE: clang-nvlink-wrapper{{.*}}"--plugin-opt=-mattr=+ptx63"
More information about the cfe-commits
mailing list