From 2ab82347a3ee450044f7967f9de5779b3e330ec1 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Sat, 25 Aug 2018 01:08:18 +0000 Subject: This patch adds support to LLVM for writing HermitCore (https://hermitcore.org) ELF binaries. HermitCore is a POSIX-compatible kernel for running a single application in an isolated environment to get maximum performance and predictable runtime behavior. It can either be used bare-metal on hardware or a VM (Unikernel) or side by side to an existing Linux system (Multikernel). Due to the latter feature, HermitCore binaries are marked with ELFOSABI_STANDALONE to let the Linux ELF loader distinguish them from regular Unix/Linux binaries and load them using the HermitCore "proxy" tool. Patch by Colin Finck! llvm-svn: 340675 --- llvm/unittests/ADT/TripleTest.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'llvm/unittests/ADT') diff --git a/llvm/unittests/ADT/TripleTest.cpp b/llvm/unittests/ADT/TripleTest.cpp index fcc71d5a5fc..7da8cffd422 100644 --- a/llvm/unittests/ADT/TripleTest.cpp +++ b/llvm/unittests/ADT/TripleTest.cpp @@ -235,6 +235,12 @@ TEST(TripleTest, ParsedIDs) { EXPECT_EQ(Triple::Fuchsia, T.getOS()); EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment()); + T = Triple("x86_64-unknown-hermit"); + EXPECT_EQ(Triple::x86_64, T.getArch()); + EXPECT_EQ(Triple::UnknownVendor, T.getVendor()); + EXPECT_EQ(Triple::HermitCore, T.getOS()); + EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment()); + T = Triple("wasm32-unknown-unknown"); EXPECT_EQ(Triple::wasm32, T.getArch()); EXPECT_EQ(Triple::UnknownVendor, T.getVendor()); -- cgit v1.2.3