[PATCH] D151359: [CUDA] Relax restrictions on variadics in host-side compilation.
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 25 11:58:44 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0ad5d40fa19f: [CUDA] Relax restrictions on variadics in host-side compilation. (authored by tra).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151359/new/
https://reviews.llvm.org/D151359
Files:
clang/lib/Driver/ToolChains/Clang.cpp
Index: clang/lib/Driver/ToolChains/Clang.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -4677,6 +4677,13 @@
CmdArgs.push_back(Args.MakeArgString(
Twine("-target-sdk-version=") +
CudaVersionToString(CTC->CudaInstallation.version())));
+ // Unsized function arguments used for variadics were introduced in
+ // CUDA-9.0. We still do not support generating code that actually uses
+ // variadic arguments yet, but we do need to allow parsing them as
+ // recent CUDA headers rely on that.
+ // https://github.com/llvm/llvm-project/issues/58410
+ if (CTC->CudaInstallation.version() >= CudaVersion::CUDA_90)
+ CmdArgs.push_back("-fcuda-allow-variadic-functions");
}
}
CmdArgs.push_back("-aux-triple");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151359.525734.patch
Type: text/x-patch
Size: 919 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230525/52aca159/attachment-0001.bin>
More information about the cfe-commits
mailing list