From 9a973f3ee99d42a283cafc26407f081daaa8ac21 Mon Sep 17 00:00:00 2001 From: Gheorghe-Teodor Bercea Date: Thu, 6 Jul 2017 16:22:21 +0000 Subject: [OpenMP] Extend CLANG target options with device offloading kind. Summary: Pass the type of the device offloading when building the tool chain for a particular target architecture. This is required when supporting multiple tool chains that target a single device type. In our particular use case, the OpenMP and CUDA tool chains will use the same ```addClangTargetOptions ``` method. This enables the reuse of common options and ensures control over options only supported by a particular tool chain. Reviewers: arpith-jacob, caomhin, carlo.bertolli, ABataev, jlebar, hfinkel, tstellar, Hahnfeld Reviewed By: hfinkel Subscribers: jgravelle-google, aheejin, rengolin, jfb, dschuff, sbc100, cfe-commits Differential Revision: https://reviews.llvm.org/D29647 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307272 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Driver/ToolChain.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/clang/Driver/ToolChain.h b/include/clang/Driver/ToolChain.h index 105d0f338a..eb42f1260d 100644 --- a/include/clang/Driver/ToolChain.h +++ b/include/clang/Driver/ToolChain.h @@ -411,7 +411,8 @@ public: /// \brief Add options that need to be passed to cc1 for this target. virtual void addClangTargetOptions(const llvm::opt::ArgList &DriverArgs, - llvm::opt::ArgStringList &CC1Args) const; + llvm::opt::ArgStringList &CC1Args, + Action::OffloadKind DeviceOffloadKind) const; /// \brief Add warning options that need to be passed to cc1 for this target. virtual void addClangWarningOptions(llvm::opt::ArgStringList &CC1Args) const; -- cgit v1.2.3