Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lit] Fix errors with wasm32-wasi #92505

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

yamt
Copy link
Contributor

@yamt yamt commented May 17, 2024

This fixes errors like:

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

This fixes errors like:
```
fatal: Could not turn 'wasm32-wasi' into Itanium ABI triple
```
@llvmbot
Copy link
Collaborator

llvmbot commented May 17, 2024

@llvm/pr-subscribers-testing-tools

Author: YAMAMOTO Takashi (yamt)

Changes

This fixes errors like:

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

Full diff: https://github.com/llvm/llvm-project/pull/92505.diff

1 Files Affected:

  • (modified) llvm/utils/lit/lit/llvm/config.py (+4-4)
diff --git a/llvm/utils/lit/lit/llvm/config.py b/llvm/utils/lit/lit/llvm/config.py
index 1d4babc99984b..a80f552ed16e5 100644
--- a/llvm/utils/lit/lit/llvm/config.py
+++ b/llvm/utils/lit/lit/llvm/config.py
@@ -355,9 +355,8 @@ def get_clang_has_lsan(self, clang, triple):
     def make_itanium_abi_triple(self, triple):
         m = re.match(r"(\w+)-(\w+)-(\w+)", triple)
         if not m:
-            self.lit_config.fatal(
-                "Could not turn '%s' into Itanium ABI triple" % triple
-            )
+            # eg. wasm32-wasi comes here
+            return triple
         if m.group(3).lower() != "windows":
             # All non-windows triples use the Itanium ABI.
             return triple
@@ -366,7 +365,8 @@ def make_itanium_abi_triple(self, triple):
     def make_msabi_triple(self, 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)
+            # eg. wasm32-wasi comes here
+            return triple
         isa = m.group(1).lower()
         vendor = m.group(2).lower()
         os = m.group(3).lower()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants