[clang] c2c917f - [Clang] Change default triple to LLVM_HOST_TRIPLE for the CUDA toolchain
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Mon May 8 13:55:00 PDT 2023
Author: Joseph Huber
Date: 2023-05-08T15:54:50-05:00
New Revision: c2c917f7f6680ec7a1214af9f5105c2beb9ba162
URL: https://github.com/llvm/llvm-project/commit/c2c917f7f6680ec7a1214af9f5105c2beb9ba162
DIFF: https://github.com/llvm/llvm-project/commit/c2c917f7f6680ec7a1214af9f5105c2beb9ba162.diff
LOG: [Clang] Change default triple to LLVM_HOST_TRIPLE for the CUDA toolchain
When cross-compiling NVPTX we use the triple to indicate which paths to
search for the CUDA toolchain. Currently this uses the default target
triple. This might not be exactly correct, as this is the default triple
used to compile binaries, not the host system. We want the host triple
because it indicates which folders should hold CUDA.
Reviewed By: tra
Differential Revision: https://reviews.llvm.org/D150136
Added:
Modified:
clang/lib/Driver/ToolChains/Cuda.cpp
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/Cuda.cpp b/clang/lib/Driver/ToolChains/Cuda.cpp
index c0fcdad861994..37b0b9c2ed05b 100644
--- a/clang/lib/Driver/ToolChains/Cuda.cpp
+++ b/clang/lib/Driver/ToolChains/Cuda.cpp
@@ -711,8 +711,7 @@ NVPTXToolChain::NVPTXToolChain(const Driver &D, const llvm::Triple &Triple,
/// system's default triple if not provided.
NVPTXToolChain::NVPTXToolChain(const Driver &D, const llvm::Triple &Triple,
const ArgList &Args)
- : NVPTXToolChain(D, Triple,
- llvm::Triple(llvm::sys::getDefaultTargetTriple()), Args,
+ : NVPTXToolChain(D, Triple, llvm::Triple(LLVM_HOST_TRIPLE), Args,
/*Freestanding=*/true) {}
llvm::opt::DerivedArgList *
More information about the cfe-commits
mailing list