diff options
Diffstat (limited to 'lib/Driver/ToolChains/Cuda.h')
-rw-r--r-- | lib/Driver/ToolChains/Cuda.h | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/lib/Driver/ToolChains/Cuda.h b/lib/Driver/ToolChains/Cuda.h index e66fc23d82f35..3d08cec1643ee 100644 --- a/lib/Driver/ToolChains/Cuda.h +++ b/lib/Driver/ToolChains/Cuda.h @@ -40,7 +40,7 @@ private: // CUDA architectures for which we have raised an error in // CheckCudaVersionSupportsArch. - mutable llvm::SmallSet<CudaArch, 4> ArchsWithVersionTooLowErrors; + mutable llvm::SmallSet<CudaArch, 4> ArchsWithBadVersion; public: CudaInstallationDetector(const Driver &D, const llvm::Triple &HostTriple, @@ -112,6 +112,20 @@ class LLVM_LIBRARY_VISIBILITY Linker : public Tool { const char *LinkingOutput) const override; }; +class LLVM_LIBRARY_VISIBILITY OpenMPLinker : public Tool { + public: + OpenMPLinker(const ToolChain &TC) + : Tool("NVPTX::OpenMPLinker", "fatbinary", TC, RF_Full, llvm::sys::WEM_UTF8, + "--options-file") {} + + bool hasIntegratedCPP() const override { return false; } + + void ConstructJob(Compilation &C, const JobAction &JA, + const InputInfo &Output, const InputInfoList &Inputs, + const llvm::opt::ArgList &TCArgs, + const char *LinkingOutput) const override; +}; + } // end namespace NVPTX } // end namespace tools @@ -120,12 +134,15 @@ namespace toolchains { class LLVM_LIBRARY_VISIBILITY CudaToolChain : public ToolChain { public: CudaToolChain(const Driver &D, const llvm::Triple &Triple, - const ToolChain &HostTC, const llvm::opt::ArgList &Args); + const ToolChain &HostTC, const llvm::opt::ArgList &Args, + const Action::OffloadKind OK); - virtual const llvm::Triple *getAuxTriple() const override { + const llvm::Triple *getAuxTriple() const override { return &HostTC.getTriple(); } + std::string getInputFilename(const InputInfo &Input) const override; + llvm::opt::DerivedArgList * TranslateArgs(const llvm::opt::DerivedArgList &Args, StringRef BoundArch, Action::OffloadKind DeviceOffloadKind) const override; @@ -141,7 +158,7 @@ public: bool isPIEDefault() const override { return false; } bool isPICDefaultForced() const override { return false; } bool SupportsProfiling() const override { return false; } - bool SupportsObjCGC() const override { return false; } + bool IsMathErrnoDefault() const override { return false; } void AddCudaIncludeArgs(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override; @@ -169,6 +186,9 @@ public: protected: Tool *buildAssembler() const override; // ptxas Tool *buildLinker() const override; // fatbinary (ok, not really a linker) + +private: + const Action::OffloadKind OK; }; } // end namespace toolchains |