diff options
author | Artem Belevich <tra@google.com> | 2015-11-17 22:28:40 +0000 |
---|---|---|
committer | Artem Belevich <tra@google.com> | 2015-11-17 22:28:40 +0000 |
commit | 5e2a3ecd48de772e65c4bef2439669390f870f48 (patch) | |
tree | e02157d468bbb7adc3e4a1e20d79efb2a5176f4f /clang/lib/Driver/Action.cpp | |
parent | e6e30d5e884af25e8fbe842c2480d5bdf529cfd0 (diff) | |
download | bcm5719-llvm-5e2a3ecd48de772e65c4bef2439669390f870f48.tar.gz bcm5719-llvm-5e2a3ecd48de772e65c4bef2439669390f870f48.zip |
[CUDA] use -aux-triple to pass target triple of opposite side of compilation
Clang needs to know target triple for both sides of compilation so that
preprocessor macros and target builtins from both sides are available.
This change augments Compilation class to carry information about
toolchains used during different CUDA compilation passes and refactors
BuildActions to use it when it constructs CUDA jobs.
Removed DeviceTriple from CudaHostAction/CudaDeviceAction as it's no
longer needed.
Differential Revision: http://reviews.llvm.org/D13144
llvm-svn: 253385
Diffstat (limited to 'clang/lib/Driver/Action.cpp')
-rw-r--r-- | clang/lib/Driver/Action.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/clang/lib/Driver/Action.cpp b/clang/lib/Driver/Action.cpp index fdbae113ff8..49dccd224bf 100644 --- a/clang/lib/Driver/Action.cpp +++ b/clang/lib/Driver/Action.cpp @@ -58,18 +58,15 @@ BindArchAction::BindArchAction(std::unique_ptr<Action> Input, void CudaDeviceAction::anchor() {} CudaDeviceAction::CudaDeviceAction(std::unique_ptr<Action> Input, - const char *ArchName, - const char *DeviceTriple, bool AtTopLevel) + const char *ArchName, bool AtTopLevel) : Action(CudaDeviceClass, std::move(Input)), GpuArchName(ArchName), - DeviceTriple(DeviceTriple), AtTopLevel(AtTopLevel) {} + AtTopLevel(AtTopLevel) {} void CudaHostAction::anchor() {} CudaHostAction::CudaHostAction(std::unique_ptr<Action> Input, - const ActionList &DeviceActions, - const char *DeviceTriple) - : Action(CudaHostClass, std::move(Input)), DeviceActions(DeviceActions), - DeviceTriple(DeviceTriple) {} + const ActionList &DeviceActions) + : Action(CudaHostClass, std::move(Input)), DeviceActions(DeviceActions) {} CudaHostAction::~CudaHostAction() { for (auto &DA : DeviceActions) |