add HermitCore target

This commit is contained in:
Andrew Kelley 2018-09-19 17:52:37 -04:00
parent a4d61b5d72
commit ce912e2964
3 changed files with 10 additions and 1 deletions

View File

@ -159,6 +159,7 @@ static const Os os_list[] = {
OsMesa3D,
OsContiki,
OsAMDPAL,
OsHermitCore,
OsZen,
};
@ -301,6 +302,8 @@ static ZigLLVM_OSType get_llvm_os_type(Os os_type) {
return ZigLLVM_Contiki;
case OsAMDPAL:
return ZigLLVM_AMDPAL;
case OsHermitCore:
return ZigLLVM_HermitCore;
}
zig_unreachable();
}
@ -370,6 +373,8 @@ static Os get_zig_os_type(ZigLLVM_OSType os_type) {
return OsContiki;
case ZigLLVM_AMDPAL:
return OsAMDPAL;
case ZigLLVM_HermitCore:
return OsHermitCore;
}
zig_unreachable();
}
@ -410,6 +415,7 @@ const char *get_target_os_name(Os os_type) {
case OsMesa3D:
case OsContiki:
case OsAMDPAL:
case OsHermitCore:
return ZigLLVMGetOSTypeName(get_llvm_os_type(os_type));
}
zig_unreachable();
@ -783,6 +789,7 @@ uint32_t target_c_type_size_in_bits(const ZigTarget *target, CIntType id) {
case OsFuchsia:
case OsContiki:
case OsAMDPAL:
case OsHermitCore:
zig_panic("TODO c type size in bits for this target");
}
zig_unreachable();

View File

@ -50,6 +50,7 @@ enum Os {
OsMesa3D,
OsContiki,
OsAMDPAL,
OsHermitCore,
OsZen,
};

View File

@ -357,8 +357,9 @@ enum ZigLLVM_OSType {
ZigLLVM_Mesa3D,
ZigLLVM_Contiki,
ZigLLVM_AMDPAL, // AMD PAL Runtime
ZigLLVM_HermitCore, // HermitCore Unikernel/Multikernel
ZigLLVM_LastOSType = ZigLLVM_AMDPAL
ZigLLVM_LastOSType = ZigLLVM_HermitCore
};
// Synchronize with target.cpp::environ_list