[PATCH] D69990: Populate CUDA flags on FreeBSD too, as many other toolchains do.
Gleb Popov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 7 23:25:13 PST 2019
6yearold created this revision.
Herald added subscribers: cfe-commits, emaste.
Herald added a project: clang.
This allows `clang` to be used to compile CUDA programs. Compiled
simple helloworld.cu with this.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D69990
Files:
clang/lib/Driver/ToolChains/FreeBSD.cpp
clang/lib/Driver/ToolChains/FreeBSD.h
Index: clang/lib/Driver/ToolChains/FreeBSD.h
===================================================================
--- clang/lib/Driver/ToolChains/FreeBSD.h
+++ clang/lib/Driver/ToolChains/FreeBSD.h
@@ -64,6 +64,8 @@
llvm::opt::ArgStringList &CC1Args) const override;
void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args,
llvm::opt::ArgStringList &CmdArgs) const override;
+ void AddCudaIncludeArgs(const llvm::opt::ArgList &DriverArgs,
+ llvm::opt::ArgStringList &CC1Args) const override;
llvm::ExceptionHandling GetExceptionModel(
const llvm::opt::ArgList &Args) const override;
Index: clang/lib/Driver/ToolChains/FreeBSD.cpp
===================================================================
--- clang/lib/Driver/ToolChains/FreeBSD.cpp
+++ clang/lib/Driver/ToolChains/FreeBSD.cpp
@@ -397,6 +397,11 @@
}
}
+void FreeBSD::AddCudaIncludeArgs(const ArgList &DriverArgs,
+ ArgStringList &CC1Args) const {
+ CudaInstallation.AddCudaIncludeArgs(DriverArgs, CC1Args);
+}
+
Tool *FreeBSD::buildAssembler() const {
return new tools::freebsd::Assembler(*this);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69990.228371.patch
Type: text/x-patch
Size: 1177 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191108/f6bf7e22/attachment.bin>
More information about the cfe-commits
mailing list