[clang] [Clang] Add standalone AMDGPU SPIR-V toolchain (PR #144576)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 19 05:46:27 PDT 2025
================
@@ -417,3 +417,15 @@ void HIPAMDToolChain::checkTargetID(
getDriver().Diag(clang::diag::err_drv_bad_target_id)
<< *PTID.OptionalTargetID;
}
+
+SPIRVAMDToolChain::SPIRVAMDToolChain(const Driver &D,
+ const llvm::Triple &Triple,
+ const ArgList &Args)
+ : ROCMToolChain(D, Triple, Args) {
+ getProgramPaths().push_back(getDriver().Dir);
+}
+
+Tool *SPIRVAMDToolChain::buildLinker() const {
+ assert(getTriple().getArch() == llvm::Triple::spirv64);
----------------
jhuber6 wrote:
This is copied from elsewhere, and is mostly just a sanity check since it's impossible to hit this code path with 32-bit triples.
https://github.com/llvm/llvm-project/pull/144576
More information about the cfe-commits
mailing list