summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Triple.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2018-08-25 01:08:18 +0000
committerEric Christopher <echristo@gmail.com>2018-08-25 01:08:18 +0000
commit2ab82347a3ee450044f7967f9de5779b3e330ec1 (patch)
tree09f95395fd886b3400b99191525cea6cff78879c /llvm/lib/Support/Triple.cpp
parentecc65eddec743b14ec129b0e76dc2184e418259e (diff)
downloadbcm5719-llvm-2ab82347a3ee450044f7967f9de5779b3e330ec1.tar.gz
bcm5719-llvm-2ab82347a3ee450044f7967f9de5779b3e330ec1.zip
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
Diffstat (limited to 'llvm/lib/Support/Triple.cpp')
-rw-r--r--llvm/lib/Support/Triple.cpp2
1 files changed, 2 insertions, 0 deletions
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);
}
OpenPOWER on IntegriCloud