[PATCH] D145770: [clang-offload-bundler] Standardize TargetID field for bundler

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 10 08:18:04 PST 2023


yaxunl added a comment.

The description needs fix. "ABI field" should be "environment component".

Also, we need a clang-offload-bundler test which bundles with a non-canonical triple and unbundles with a canonical triple and vice versa.



================
Comment at: clang/lib/Driver/OffloadBundler.cpp:76-79
+    // Enforce optional ABI field to standardize bundles
+    llvm::Triple t = llvm::Triple(KindTriple.second);
+    this->Triple = llvm::Triple(t.getArchName(), t.getVendorName(),
+                                t.getOSName(), t.getEnvironmentName());
----------------
can we use Triple::normalize to normalize KindTriple.second, then use the returned string to create this->Triple? This is the conventional way to normalize the triple.

same as below


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145770/new/

https://reviews.llvm.org/D145770



More information about the cfe-commits mailing list