summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains/Cuda.cpp
diff options
context:
space:
mode:
authorGheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com>2017-08-09 19:52:28 +0000
committerGheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com>2017-08-09 19:52:28 +0000
commit690f6f9b9fca40dbe755562bb9cb6f9ad9e93c29 (patch)
treeed54e18f232a39d34dbd7f04eb4a9aa7d0bc523a /clang/lib/Driver/ToolChains/Cuda.cpp
parent118a9289318940e80dd0b19579cbf1a755d56085 (diff)
downloadbcm5719-llvm-690f6f9b9fca40dbe755562bb9cb6f9ad9e93c29.tar.gz
bcm5719-llvm-690f6f9b9fca40dbe755562bb9cb6f9ad9e93c29.zip
[OpenMP] Enable executable lookup into driver directory.
Summary: Invoking the compiler inside a script causes the clang-offload-bundler executable to not be found. This patch enables the lookup for executables in the driver directory where the clang-offload-bundler resides. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, ABataev, caomhin Reviewed By: hfinkel Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36537 llvm-svn: 310513
Diffstat (limited to 'clang/lib/Driver/ToolChains/Cuda.cpp')
-rw-r--r--clang/lib/Driver/ToolChains/Cuda.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Driver/ToolChains/Cuda.cpp b/clang/lib/Driver/ToolChains/Cuda.cpp
index b6a7b829f50..41185ed07bf 100644
--- a/clang/lib/Driver/ToolChains/Cuda.cpp
+++ b/clang/lib/Driver/ToolChains/Cuda.cpp
@@ -438,6 +438,9 @@ CudaToolChain::CudaToolChain(const Driver &D, const llvm::Triple &Triple,
CudaInstallation(D, HostTC.getTriple(), Args), OK(OK) {
if (CudaInstallation.isValid())
getProgramPaths().push_back(CudaInstallation.getBinPath());
+ // Lookup binaries into the driver directory, this is used to
+ // discover the clang-offload-bundler executable.
+ getProgramPaths().push_back(getDriver().Dir);
}
void CudaToolChain::addClangTargetOptions(
OpenPOWER on IntegriCloud