AMDPAL, // AMD PAL Runtime
HermitCore, // HermitCore Unikernel/Multikernel
Hurd, // GNU/Hurd
- COWS, // Capability-Oriented WebAssembly Syscalls
- LastOSType = COWS
+ WASI, // Experimental WebAssembly OS
+ LastOSType = WASI
};
enum EnvironmentType {
UnknownEnvironment,
return getOS() == Triple::Hurd;
}
- /// Tests whether the OS is COWS.
- bool isOSCOWS() const {
- return getOS() == Triple::COWS;
+ /// Tests whether the OS is WASI.
+ bool isOSWASI() const {
+ return getOS() == Triple::WASI;
}
/// Tests whether the OS uses glibc.
case AMDPAL: return "amdpal";
case HermitCore: return "hermit";
case Hurd: return "hurd";
- case COWS: return "cows";
+ case WASI: return "wasi";
}
llvm_unreachable("Invalid OSType");
.StartsWith("amdpal", Triple::AMDPAL)
.StartsWith("hermit", Triple::HermitCore)
.StartsWith("hurd", Triple::Hurd)
- .StartsWith("cows", Triple::COWS)
+ .StartsWith("wasi", Triple::WASI)
.Default(Triple::UnknownOS);
}
EXPECT_EQ(Triple::UnknownOS, T.getOS());
EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
- T = Triple("wasm32-unknown-cows-musl");
+ T = Triple("wasm32-unknown-wasi-musl");
EXPECT_EQ(Triple::wasm32, T.getArch());
EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
- EXPECT_EQ(Triple::COWS, T.getOS());
+ EXPECT_EQ(Triple::WASI, T.getOS());
EXPECT_EQ(Triple::Musl, T.getEnvironment());
T = Triple("wasm64-unknown-unknown");
EXPECT_EQ(Triple::UnknownOS, T.getOS());
EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
- T = Triple("wasm64-unknown-cows-musl");
+ T = Triple("wasm64-unknown-wasi-musl");
EXPECT_EQ(Triple::wasm64, T.getArch());
EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
- EXPECT_EQ(Triple::COWS, T.getOS());
+ EXPECT_EQ(Triple::WASI, T.getOS());
EXPECT_EQ(Triple::Musl, T.getEnvironment());
T = Triple("avr-unknown-unknown");
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-cows-musl").getObjectFormat());
- EXPECT_EQ(Triple::Wasm, Triple("wasm64-unknown-cows-musl").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-unknown-unknown-wasm").getObjectFormat());
EXPECT_EQ(Triple::Wasm,
Triple("wasm64-unknown-unknown-wasm").getObjectFormat());
EXPECT_EQ(Triple::Wasm,
- Triple("wasm32-unknown-cows-musl-wasm").getObjectFormat());
+ Triple("wasm32-unknown-wasi-musl-wasm").getObjectFormat());
EXPECT_EQ(Triple::Wasm,
- Triple("wasm64-unknown-cows-musl-wasm").getObjectFormat());
+ Triple("wasm64-unknown-wasi-musl-wasm").getObjectFormat());
Triple MSVCNormalized(Triple::normalize("i686-pc-windows-msvc-elf"));
EXPECT_EQ(Triple::ELF, MSVCNormalized.getObjectFormat());