BFC-Compiler
A C23 Brainfuck compiler
Loading...
Searching...
No Matches
bfc_target.h
Go to the documentation of this file.
1
8#ifndef BFC_TARGET_H
9#define BFC_TARGET_H
10
11#include "bfc_error.h"
12
16typedef enum
17{
18 BFC_ARCH_X86_64,
19 BFC_ARCH_I386,
20 BFC_ARCH_AARCH64,
21 BFC_ARCH_ARM32,
23
27typedef enum
28{
29 BFC_OS_WINDOWS,
30 BFC_OS_MACOS,
31 BFC_OS_LINUX,
32} bfc_os_t;
33
37typedef struct
38{
39 bfc_arch_t arch;
40 bfc_os_t os;
42
51[[gnu::nonnull(1, 2)]]
52bfc_error_t bfc_target_parse(bfc_target_t* target, const char* triple);
53
59[[gnu::const]]
61
62#endif // BFC_TARGET_H
Compiler error values and diagnostics.
bfc_os_t
Operating systems that determine ABI and object-format behaviour.
Definition bfc_target.h:28
bfc_target_t bfc_target_host(void)
Returns the target corresponding to the compiler host.
Definition bfc_target.c:102
bfc_error_t bfc_target_parse(bfc_target_t *target, const char *triple)
Parses a supported target triple.
Definition bfc_target.c:85
bfc_arch_t
Architectures understood by target parsing and backend selection.
Definition bfc_target.h:17
Error value propagated through compiler stages.
Definition bfc_error.h:42
Architecture and operating-system pair used to select a backend.
Definition bfc_target.h:38