[clang] [HIP] Fix OffloadBundler triple when using extra 'llvm' environment (PR #214841)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 8 09:09:09 PDT 2026


================
@@ -41,10 +41,16 @@ const unsigned HIPCodeObjectAlign = 4096;
 // Constructs a triple string for clang offload bundler.
 static std::string normalizeForBundler(const llvm::Triple &T,
                                        bool HasTargetID) {
-  return HasTargetID ? (T.getArchName() + "-" + T.getVendorName() + "-" +
-                        T.getOSName() + "-" + T.getEnvironmentName())
-                           .str()
-                     : T.normalize(llvm::Triple::CanonicalForm::FOUR_IDENT);
+  // The 'llvm' environment is not recognized by the HIP runtime.
----------------
jhuber6 wrote:

The triple is hard-coded in the runtime itself, I probably should've linked it, but yes. It's a `#define` and probably not worth modifying anything. (This is why we use magic bytes instead of the triple for OpenMP).

https://github.com/llvm/llvm-project/pull/214841


More information about the cfe-commits mailing list