authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-09-19 17:52:37-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-09-19 17:52:37-04:00
logce912e29640e0a3b39a5c304c86bdbb5fff67169
treee1c56ca53be2a2765f8edbec1bf1395de03d3253
parenta4d61b5d72750a11d8294986939b433070f3d1ff

add HermitCore target


3 files changed, 10 insertions(+), 1 deletions(-)

src/target.cpp+7
......@@ -159,6 +159,7 @@ static const Os os_list[] = {
159159 OsMesa3D,
160160 OsContiki,
161161 OsAMDPAL,
162 OsHermitCore,
162163 OsZen,
163164};
164165
......@@ -301,6 +302,8 @@ static ZigLLVM_OSType get_llvm_os_type(Os os_type) {
301302 return ZigLLVM_Contiki;
302303 case OsAMDPAL:
303304 return ZigLLVM_AMDPAL;
305 case OsHermitCore:
306 return ZigLLVM_HermitCore;
304307 }
305308 zig_unreachable();
306309}
......@@ -370,6 +373,8 @@ static Os get_zig_os_type(ZigLLVM_OSType os_type) {
370373 return OsContiki;
371374 case ZigLLVM_AMDPAL:
372375 return OsAMDPAL;
376 case ZigLLVM_HermitCore:
377 return OsHermitCore;
373378 }
374379 zig_unreachable();
375380}
......@@ -410,6 +415,7 @@ const char *get_target_os_name(Os os_type) {
410415 case OsMesa3D:
411416 case OsContiki:
412417 case OsAMDPAL:
418 case OsHermitCore:
413419 return ZigLLVMGetOSTypeName(get_llvm_os_type(os_type));
414420 }
415421 zig_unreachable();
......@@ -783,6 +789,7 @@ uint32_t target_c_type_size_in_bits(const ZigTarget *target, CIntType id) {
783789 case OsFuchsia:
784790 case OsContiki:
785791 case OsAMDPAL:
792 case OsHermitCore:
786793 zig_panic("TODO c type size in bits for this target");
787794 }
788795 zig_unreachable();
src/target.hpp+1
......@@ -50,6 +50,7 @@ enum Os {
5050 OsMesa3D,
5151 OsContiki,
5252 OsAMDPAL,
53 OsHermitCore,
5354 OsZen,
5455};
5556
src/zig_llvm.h+2-1
......@@ -357,8 +357,9 @@ enum ZigLLVM_OSType {
357357 ZigLLVM_Mesa3D,
358358 ZigLLVM_Contiki,
359359 ZigLLVM_AMDPAL, // AMD PAL Runtime
360 ZigLLVM_HermitCore, // HermitCore Unikernel/Multikernel
360361
361 ZigLLVM_LastOSType = ZigLLVM_AMDPAL
362 ZigLLVM_LastOSType = ZigLLVM_HermitCore
362363};
363364
364365// Synchronize with target.cpp::environ_list