[PATCH] D61334: [WebAssembly] Test the "wasm32-wasi" triple
Dan Gohman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 30 12:38:55 PDT 2019
sunfish created this revision.
sunfish added reviewers: dschuff, sbc100, aheejin.
Herald added subscribers: dexonsmith, jgravelle-google.
Herald added a project: LLVM.
Add triple tests for "wasm32-wasi" and "wasm64-wasi", and also remove the "-musl" component from the existing wasm triple tests as we're not using that in practice (WASI libc is derived in part from musl, but it is not fully musl-compatible).
Repository:
rL LLVM
https://reviews.llvm.org/D61334
Files:
unittests/ADT/TripleTest.cpp
Index: unittests/ADT/TripleTest.cpp
===================================================================
--- unittests/ADT/TripleTest.cpp
+++ unittests/ADT/TripleTest.cpp
@@ -252,11 +252,11 @@
EXPECT_EQ(Triple::UnknownOS, T.getOS());
EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
- T = Triple("wasm32-unknown-wasi-musl");
+ T = Triple("wasm32-unknown-wasi");
EXPECT_EQ(Triple::wasm32, T.getArch());
EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
EXPECT_EQ(Triple::WASI, T.getOS());
- EXPECT_EQ(Triple::Musl, T.getEnvironment());
+ EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
T = Triple("wasm64-unknown-unknown");
EXPECT_EQ(Triple::wasm64, T.getArch());
@@ -264,11 +264,11 @@
EXPECT_EQ(Triple::UnknownOS, T.getOS());
EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
- T = Triple("wasm64-unknown-wasi-musl");
+ T = Triple("wasm64-unknown-wasi");
EXPECT_EQ(Triple::wasm64, T.getArch());
EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
EXPECT_EQ(Triple::WASI, T.getOS());
- EXPECT_EQ(Triple::Musl, T.getEnvironment());
+ EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
T = Triple("avr-unknown-unknown");
EXPECT_EQ(Triple::avr, T.getArch());
@@ -702,6 +702,10 @@
Triple::normalize("i686-linux")); // i686-pc-linux-gnu
EXPECT_EQ("arm-none-unknown-eabi",
Triple::normalize("arm-none-eabi")); // arm-none-eabi
+ EXPECT_EQ("wasm32-unknown-wasi",
+ Triple::normalize("wasm32-wasi")); // wasm32-unknown-wasi
+ EXPECT_EQ("wasm64-unknown-wasi",
+ Triple::normalize("wasm64-wasi")); // wasm64-unknown-wasi
}
TEST(TripleTest, MutateName) {
@@ -1246,17 +1250,23 @@
EXPECT_EQ(Triple::Wasm, Triple("wasm32-unknown-unknown").getObjectFormat());
EXPECT_EQ(Triple::Wasm, Triple("wasm64-unknown-unknown").getObjectFormat());
- EXPECT_EQ(Triple::Wasm, Triple("wasm32-unknown-wasi-musl").getObjectFormat());
- EXPECT_EQ(Triple::Wasm, Triple("wasm64-unknown-wasi-musl").getObjectFormat());
+ EXPECT_EQ(Triple::Wasm, Triple("wasm32-wasi").getObjectFormat());
+ EXPECT_EQ(Triple::Wasm, Triple("wasm64-wasi").getObjectFormat());
+ EXPECT_EQ(Triple::Wasm, Triple("wasm32-unknown-wasi").getObjectFormat());
+ EXPECT_EQ(Triple::Wasm, Triple("wasm64-unknown-wasi").getObjectFormat());
EXPECT_EQ(Triple::Wasm,
Triple("wasm32-unknown-unknown-wasm").getObjectFormat());
EXPECT_EQ(Triple::Wasm,
Triple("wasm64-unknown-unknown-wasm").getObjectFormat());
EXPECT_EQ(Triple::Wasm,
- Triple("wasm32-unknown-wasi-musl-wasm").getObjectFormat());
+ Triple("wasm32-wasi-wasm").getObjectFormat());
+ EXPECT_EQ(Triple::Wasm,
+ Triple("wasm64-wasi-wasm").getObjectFormat());
+ EXPECT_EQ(Triple::Wasm,
+ Triple("wasm32-unknown-wasi-wasm").getObjectFormat());
EXPECT_EQ(Triple::Wasm,
- Triple("wasm64-unknown-wasi-musl-wasm").getObjectFormat());
+ Triple("wasm64-unknown-wasi-wasm").getObjectFormat());
EXPECT_EQ(Triple::XCOFF, Triple("powerpc-ibm-aix").getObjectFormat());
EXPECT_EQ(Triple::XCOFF, Triple("powerpc64-ibm-aix").getObjectFormat());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61334.197412.patch
Type: text/x-patch
Size: 3193 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190430/5379e7be/attachment.bin>
More information about the llvm-commits
mailing list