[PATCH] D156305: [lit] Fix errors on wasm32-wasi

YAMAMOTO Takashi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 26 03:10:26 PDT 2023


yamt created this revision.
Herald added subscribers: delcypher, sunfish.
Herald added a project: All.
yamt requested review of this revision.
Herald added subscribers: llvm-commits, aheejin.
Herald added a project: LLVM.

This fixes errors like:

  fatal: Could not turn 'wasm32-wasi' into Itanium ABI triple


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D156305

Files:
  llvm/utils/lit/lit/llvm/config.py


Index: llvm/utils/lit/lit/llvm/config.py
===================================================================
--- llvm/utils/lit/lit/llvm/config.py
+++ llvm/utils/lit/lit/llvm/config.py
@@ -331,6 +331,8 @@
         return False
 
     def make_itanium_abi_triple(self, triple):
+        if triple == "wasm32-wasi":
+            return triple
         m = re.match(r"(\w+)-(\w+)-(\w+)", triple)
         if not m:
             self.lit_config.fatal(
@@ -342,6 +344,8 @@
         return m.group(1) + "-" + m.group(2) + "-" + m.group(3) + "-gnu"
 
     def make_msabi_triple(self, triple):
+        if triple == "wasm32-wasi":
+            return triple
         m = re.match(r"(\w+)-(\w+)-(\w+)", triple)
         if not m:
             self.lit_config.fatal("Could not turn '%s' into MS ABI triple" % triple)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156305.544279.patch
Type: text/x-patch
Size: 807 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230726/58f213fe/attachment.bin>


More information about the llvm-commits mailing list