From: Gheorghe-Teodor Bercea Date: Wed, 9 Aug 2017 19:52:28 +0000 (+0000) Subject: [OpenMP] Enable executable lookup into driver directory. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=16c706343503911d2ec5e994d9b8fd3f83ac339e;p=clang [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310513 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/ToolChains/Cuda.cpp b/lib/Driver/ToolChains/Cuda.cpp index b6a7b829f5..41185ed07b 100644 --- a/lib/Driver/ToolChains/Cuda.cpp +++ b/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(