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/lib/Support/Triple.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/Support/Triple.cpp') diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp index c48be2d0cba..d1017fb2a28 100644 --- a/llvm/lib/Support/Triple.cpp +++ b/llvm/lib/Support/Triple.cpp @@ -209,6 +209,7 @@ StringRef Triple::getOSTypeName(OSType Kind) { case Mesa3D: return "mesa3d"; case Contiki: return "contiki"; case AMDPAL: return "amdpal"; + case HermitCore: return "hermit"; } llvm_unreachable("Invalid OSType"); @@ -502,6 +503,7 @@ static Triple::OSType parseOS(StringRef OSName) { .StartsWith("mesa3d", Triple::Mesa3D) .StartsWith("contiki", Triple::Contiki) .StartsWith("amdpal", Triple::AMDPAL) + .StartsWith("hermit", Triple::HermitCore) .Default(Triple::UnknownOS); } -- cgit v1.2.3