mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Auto-import std::core. Fix module assignment of declarations. Introspection improvements. Deref null error panics in safe mode. Support for LLVM 15
This commit is contained in:
committed by
Christoffer Lerno
parent
df41caabdd
commit
b1d83e2ccd
58
lib/std/core/env.c3
Normal file
58
lib/std/core/env.c3
Normal file
@@ -0,0 +1,58 @@
|
||||
// Copyright (c) 2021 Christoffer Lerno. All rights reserved.
|
||||
// Use of this source code is governed by the MIT license
|
||||
// a copy of which can be found in the LICENSE_STDLIB file.
|
||||
module std::core::env;
|
||||
|
||||
enum CompilerOptLevel
|
||||
{
|
||||
O0,
|
||||
O1,
|
||||
O2,
|
||||
O3
|
||||
}
|
||||
|
||||
enum OsType
|
||||
{
|
||||
UNKNOWN,
|
||||
NONE,
|
||||
ANANAS,
|
||||
CLOUD_ABI,
|
||||
DRAGON_FLY,
|
||||
FREEBSD,
|
||||
FUCHSIA,
|
||||
IOS,
|
||||
KFREEBSD,
|
||||
LINUX,
|
||||
PS3,
|
||||
MACOSX,
|
||||
NETBSD,
|
||||
OPENBSD,
|
||||
SOLARIS,
|
||||
WIN32,
|
||||
HAIKU,
|
||||
MINIX,
|
||||
RTEMS,
|
||||
NACL, // Native Client
|
||||
CNK, // BG/P Compute-Node Kernel
|
||||
AIX,
|
||||
CUDA,
|
||||
NVOPENCL,
|
||||
AMDHSA,
|
||||
PS4,
|
||||
ELFIAMCU,
|
||||
TVOS,
|
||||
WATCHOS,
|
||||
MESA3D,
|
||||
CONTIKI,
|
||||
AMDPAL,
|
||||
HERMITCORE,
|
||||
HURD,
|
||||
WASI,
|
||||
EMSCRIPTEN,
|
||||
}
|
||||
|
||||
const OsType OS_TYPE = (OsType)($$OS_TYPE);
|
||||
const CompilerOptLevel COMPILER_OPT_LEVEL = (CompilerOptLevel)($$COMPILER_OPT_LEVEL);
|
||||
const bool BIG_ENDIAN = $$PLATFORM_BIG_ENDIAN;
|
||||
const bool I128_SUPPORT = $$PLATFORM_I128_SUPPORTED;
|
||||
const bool COMPILER_SAFE_MODE = $$COMPILER_SAFE_MODE;
|
||||
Reference in New Issue
Block a user