Compile Variables

    1. pub const StackTrace = struct {
    2. index: usize,
    3. instruction_addresses: []usize,
    4. };
    5. pub const PanicFn = fn([]const u8, ?*StackTrace) noreturn;
    6. pub const Os = enum {
    7. freestanding,
    8. ananas,
    9. cloudabi,
    10. dragonfly,
    11. freebsd,
    12. fuchsia,
    13. ios,
    14. kfreebsd,
    15. linux,
    16. lv2,
    17. macosx,
    18. netbsd,
    19. openbsd,
    20. solaris,
    21. windows,
    22. haiku,
    23. minix,
    24. rtems,
    25. nacl,
    26. cnk,
    27. aix,
    28. cuda,
    29. nvcl,
    30. amdhsa,
    31. ps4,
    32. elfiamcu,
    33. tvos,
    34. watchos,
    35. mesa3d,
    36. contiki,
    37. amdpal,
    38. hermit,
    39. hurd,
    40. wasi,
    41. emscripten,
    42. zen,
    43. uefi,
    44. };
    45. pub const Arch = union(enum) {
    46. arm: Arm32,
    47. armeb: Arm32,
    48. aarch64: Arm64,
    49. aarch64_be: Arm64,
    50. aarch64_32: Arm64,
    51. arc,
    52. avr,
    53. bpfel,
    54. bpfeb,
    55. hexagon,
    56. mips,
    57. mipsel,
    58. mips64,
    59. mips64el,
    60. msp430,
    61. powerpc,
    62. powerpc64,
    63. powerpc64le,
    64. r600,
    65. amdgcn,
    66. riscv32,
    67. riscv64,
    68. sparc,
    69. sparcv9,
    70. sparcel,
    71. s390x,
    72. tce,
    73. tcele,
    74. thumb: Arm32,
    75. thumbeb: Arm32,
    76. i386,
    77. x86_64,
    78. xcore,
    79. nvptx,
    80. nvptx64,
    81. le32,
    82. le64,
    83. amdil,
    84. amdil64,
    85. hsail,
    86. hsail64,
    87. spir,
    88. spir64,
    89. kalimba: Kalimba,
    90. shave,
    91. lanai,
    92. wasm32,
    93. wasm64,
    94. renderscript32,
    95. renderscript64,
    96. pub const Arm32 = enum {
    97. v8_5a,
    98. v8_4a,
    99. v8_3a,
    100. v8_2a,
    101. v8_1a,
    102. v8,
    103. v8r,
    104. v8m_baseline,
    105. v8m_mainline,
    106. v8_1m_mainline,
    107. v7,
    108. v7em,
    109. v7m,
    110. v7s,
    111. v7k,
    112. v7ve,
    113. v6,
    114. v6m,
    115. v6k,
    116. v6t2,
    117. v5,
    118. v5te,
    119. v4t,
    120. };
    121. pub const Arm64 = enum {
    122. v8_5a,
    123. v8_4a,
    124. v8_3a,
    125. v8_2a,
    126. v8_1a,
    127. v8,
    128. v8r,
    129. v8m_baseline,
    130. v8m_mainline,
    131. };
    132. pub const Kalimba = enum {
    133. v5,
    134. v4,
    135. v3,
    136. };
    137. pub const Mips = enum {
    138. r6,
    139. };
    140. };
    141. pub const Abi = enum {
    142. none,
    143. gnu,
    144. gnuabin32,
    145. gnuabi64,
    146. gnueabi,
    147. gnueabihf,
    148. gnux32,
    149. code16,
    150. elfv1,
    151. elfv2,
    152. android,
    153. musl,
    154. musleabi,
    155. musleabihf,
    156. msvc,
    157. itanium,
    158. cygnus,
    159. coreclr,
    160. simulator,
    161. macabi,
    162. };
    163. pub const ObjectFormat = enum {
    164. unknown,
    165. coff,
    166. elf,
    167. macho,
    168. wasm,
    169. };
    170. pub const GlobalLinkage = enum {
    171. Internal,
    172. Strong,
    173. Weak,
    174. LinkOnce,
    175. };
    176. pub const AtomicOrder = enum {
    177. Unordered,
    178. Monotonic,
    179. Acquire,
    180. Release,
    181. AcqRel,
    182. SeqCst,
    183. };
    184. pub const AtomicRmwOp = enum {
    185. Xchg,
    186. Add,
    187. Sub,
    188. And,
    189. Nand,
    190. Or,
    191. Xor,
    192. Max,
    193. Min,
    194. };
    195. pub const Mode = enum {
    196. Debug,
    197. ReleaseSafe,
    198. ReleaseFast,
    199. ReleaseSmall,
    200. };
    201. pub const TypeId = enum {
    202. Type,
    203. Void,
    204. Bool,
    205. NoReturn,
    206. Int,
    207. Float,
    208. Pointer,
    209. Array,
    210. Struct,
    211. ComptimeFloat,
    212. ComptimeInt,
    213. Undefined,
    214. Null,
    215. Optional,
    216. ErrorUnion,
    217. ErrorSet,
    218. Enum,
    219. Union,
    220. Fn,
    221. BoundFn,
    222. ArgTuple,
    223. Opaque,
    224. Frame,
    225. AnyFrame,
    226. Vector,
    227. EnumLiteral,
    228. };
    229. pub const TypeInfo = union(TypeId) {
    230. Type: void,
    231. Void: void,
    232. Bool: void,
    233. NoReturn: void,
    234. Int: Int,
    235. Float: Float,
    236. Pointer: Pointer,
    237. Array: Array,
    238. Struct: Struct,
    239. ComptimeFloat: void,
    240. ComptimeInt: void,
    241. Undefined: void,
    242. Null: void,
    243. Optional: Optional,
    244. ErrorUnion: ErrorUnion,
    245. ErrorSet: ErrorSet,
    246. Enum: Enum,
    247. Union: Union,
    248. Fn: Fn,
    249. BoundFn: Fn,
    250. ArgTuple: void,
    251. Opaque: void,
    252. Frame: void,
    253. AnyFrame: AnyFrame,
    254. Vector: Vector,
    255. EnumLiteral: void,
    256. pub const Int = struct {
    257. is_signed: bool,
    258. bits: comptime_int,
    259. };
    260. pub const Float = struct {
    261. bits: comptime_int,
    262. };
    263. pub const Pointer = struct {
    264. size: Size,
    265. is_const: bool,
    266. is_volatile: bool,
    267. alignment: comptime_int,
    268. child: type,
    269. is_allowzero: bool,
    270. pub const Size = enum {
    271. One,
    272. Many,
    273. Slice,
    274. C,
    275. };
    276. };
    277. pub const Array = struct {
    278. len: comptime_int,
    279. child: type,
    280. };
    281. pub const ContainerLayout = enum {
    282. Auto,
    283. Extern,
    284. Packed,
    285. };
    286. pub const StructField = struct {
    287. name: []const u8,
    288. };
    289. pub const Struct = struct {
    290. layout: ContainerLayout,
    291. fields: []StructField,
    292. decls: []Declaration,
    293. };
    294. pub const Optional = struct {
    295. child: type,
    296. };
    297. pub const ErrorUnion = struct {
    298. error_set: type,
    299. payload: type,
    300. };
    301. pub const Error = struct {
    302. name: []const u8,
    303. value: comptime_int,
    304. };
    305. pub const ErrorSet = ?[]Error;
    306. pub const EnumField = struct {
    307. name: []const u8,
    308. value: comptime_int,
    309. };
    310. pub const Enum = struct {
    311. layout: ContainerLayout,
    312. tag_type: type,
    313. fields: []EnumField,
    314. decls: []Declaration,
    315. };
    316. pub const UnionField = struct {
    317. name: []const u8,
    318. enum_field: ?EnumField,
    319. field_type: type,
    320. };
    321. pub const Union = struct {
    322. layout: ContainerLayout,
    323. tag_type: ?type,
    324. fields: []UnionField,
    325. decls: []Declaration,
    326. };
    327. pub const CallingConvention = enum {
    328. Unspecified,
    329. C,
    330. Cold,
    331. Naked,
    332. Stdcall,
    333. Async,
    334. };
    335. pub const FnArg = struct {
    336. is_generic: bool,
    337. is_noalias: bool,
    338. arg_type: ?type,
    339. };
    340. pub const Fn = struct {
    341. calling_convention: CallingConvention,
    342. is_generic: bool,
    343. is_var_args: bool,
    344. return_type: ?type,
    345. args: []FnArg,
    346. };
    347. pub const AnyFrame = struct {
    348. child: ?type,
    349. };
    350. pub const Vector = struct {
    351. len: comptime_int,
    352. child: type,
    353. };
    354. pub const Declaration = struct {
    355. name: []const u8,
    356. is_pub: bool,
    357. data: Data,
    358. pub const Data = union(enum) {
    359. Type: type,
    360. Var: type,
    361. Fn: FnDecl,
    362. pub const FnDecl = struct {
    363. fn_type: type,
    364. inline_type: Inline,
    365. calling_convention: CallingConvention,
    366. is_var_args: bool,
    367. is_extern: bool,
    368. is_export: bool,
    369. lib_name: ?[]const u8,
    370. return_type: type,
    371. arg_names: [][] const u8,
    372. pub const Inline = enum {
    373. Auto,
    374. Always,
    375. Never,
    376. };
    377. };
    378. };
    379. };
    380. };
    381. pub const FloatMode = enum {
    382. Strict,
    383. Optimized,
    384. };
    385. pub const Endian = enum {
    386. Big,
    387. Little,
    388. };
    389. pub const Version = struct {
    390. major: u32,
    391. minor: u32,
    392. patch: u32,
    393. };
    394. pub const SubSystem = enum {
    395. Console,
    396. Windows,
    397. Posix,
    398. Native,
    399. EfiApplication,
    400. EfiBootServiceDriver,
    401. EfiRom,
    402. EfiRuntimeDriver,
    403. };
    404. pub const endian = Endian.Little;
    405. pub const is_test = false;
    406. pub const single_threaded = false;
    407. pub const os = Os.linux;
    408. pub const arch = Arch.x86_64;
    409. pub const abi = Abi.gnu;
    410. pub const glibc_version: ?Version = null;
    411. pub const object_format = ObjectFormat.elf;
    412. pub const mode = Mode.Debug;
    413. pub const link_libc = false;
    414. pub const have_error_return_tracing = true;
    415. pub const valgrind_support = true;
    416. pub const position_independent_code = false;
    417. pub const strip_debug_info = false;