2026-03-17 20:29:40 +08:00
|
|
|
#ifndef __SCC_CONFIG_H__
|
|
|
|
|
#define __SCC_CONFIG_H__
|
|
|
|
|
|
|
|
|
|
#include <argparse.h>
|
|
|
|
|
|
2026-05-10 15:02:36 +08:00
|
|
|
typedef enum scc_emit_stage {
|
|
|
|
|
SCC_EMIT_STAGE_LEX,
|
|
|
|
|
SCC_EMIT_STAGE_PP,
|
|
|
|
|
SCC_EMIT_STAGE_AST,
|
|
|
|
|
SCC_EMIT_STAGE_HIR,
|
|
|
|
|
SCC_EMIT_STAGE_LIR,
|
|
|
|
|
SCC_EMIT_STAGE_MIR,
|
|
|
|
|
|
|
|
|
|
SCC_EMIT_STAGE_MIR_PASS_REG_ALLOC,
|
|
|
|
|
SCC_EMIT_STAGE_MIR_PASS_FLAME_LAYOUT,
|
|
|
|
|
SCC_EMIT_STAGE_MIR_PASS_PROLOG_EPILOG,
|
|
|
|
|
|
|
|
|
|
SCC_EMIT_STAGE_FLATBIN,
|
|
|
|
|
SCC_EMIT_STAGE_SCCF,
|
|
|
|
|
SCC_EMIT_STAGE_TARGET,
|
|
|
|
|
|
|
|
|
|
SCC_EMIT_STAGE_DEFAULT,
|
|
|
|
|
} scc_emit_stage_t;
|
|
|
|
|
|
2026-03-17 20:29:40 +08:00
|
|
|
typedef struct {
|
|
|
|
|
const char *input_file;
|
|
|
|
|
const char *output_file;
|
2026-03-21 10:33:17 +08:00
|
|
|
const char *target_description;
|
2026-03-17 20:29:40 +08:00
|
|
|
int verbose;
|
|
|
|
|
scc_argparse_list_t include_paths;
|
|
|
|
|
scc_argparse_list_t define_macros;
|
2026-04-13 11:36:52 +08:00
|
|
|
const char *entry_point_symbol;
|
2026-05-01 22:51:31 +08:00
|
|
|
|
2026-05-10 15:02:36 +08:00
|
|
|
scc_emit_stage_t emit_stage;
|
2026-03-17 20:29:40 +08:00
|
|
|
} scc_config_t;
|
|
|
|
|
|
2026-05-10 15:02:36 +08:00
|
|
|
void setup_argparse(scc_argparse_t *argparse, scc_config_t *config,
|
|
|
|
|
scc_argparse_lang_t lang);
|
2026-03-17 20:29:40 +08:00
|
|
|
|
|
|
|
|
#endif /* __SCC_CONFIG_H___ */
|