18 .brief =
"Cthulhu CLI configuration options",
25 .brief =
"Load a language driver",
33 .brief =
"Load a plugin",
41 .brief =
"Load a target",
49 .brief =
"Emit SSA IR to the output directory",
57 .brief =
"Emit the parse tree to the output directory",
64 .
name =
"file-layout",
65 .brief =
"File layout to use",
66 .args =
CT_ARGS(kFileLayoutArgs),
70 {
"pair", eFileLayoutPair },
71 {
"single", eFileLayoutSingle },
72 {
"tree", eFileLayoutTree },
73 {
"flat", eFileLayoutFlat },
79 .
name =
"target-output",
80 .brief =
"Target to use for output generation",
81 .args =
CT_ARGS(kTargetOutputArgs),
87 .
name =
"warn-as-error",
88 .brief =
"Treat warnings as errors",
89 .args =
CT_ARGS(kWarnAsErrorArgs),
96 .brief =
"Limit the number of reports",
97 .args =
CT_ARGS(kReportLimitArgs),
103 .
name =
"output-dir",
104 .brief =
"Output directory for generated files",
105 .args =
CT_ARGS(kOutputDirArgs),
111 .
name =
"report-style",
112 .brief =
"Report style to use",
113 .args =
CT_ARGS(kReportStyleArgs),
138 .options = kFileLayoutChoices,
139 .count = (
sizeof(kFileLayoutChoices) /
sizeof(
cfg_choice_t)),
140 .initial = eFileLayoutPair,
148 cfg_int_t report_limit_options = {.initial = 20, .min = 0, .max = 1000};
152 .options = kReportStyleChoices,
153 .count = (
sizeof(kReportStyleChoices) /
sizeof(
cfg_choice_t)),
162 .add_language = add_language_field,
163 .add_plugin = add_plugin_field,
164 .add_target = add_target_field,
166 .emit_tree = emit_tree_field,
167 .emit_ssa = emit_ir_field,
168 .output_dir = output_dir_field,
169 .output_layout = file_layout_field,
170 .output_target = output_target_field,
172 .warn_as_error = warn_as_error_field,
173 .report_limit = report_limit_field,
174 .report_style = report_style_field,
tool_t make_tool(version_info_t version, arena_t *arena)
CT_CONFIG_API cfg_field_t * config_enum(cfg_group_t *group, const cfg_info_t *info, cfg_enum_t cfg)
add a new choice field to a configuration group
CT_CONFIG_API cfg_field_t * config_int(cfg_group_t *group, const cfg_info_t *info, cfg_int_t cfg)
add a new integer field to a configuration group
CT_CONFIG_API cfg_field_t * config_string(cfg_group_t *group, const cfg_info_t *info, const char *initial)
add a new string field to a configuration group
CT_CONFIG_API cfg_field_t * config_vector(cfg_group_t *group, const cfg_info_t *info, vector_t *initial)
add a new vector field to a configuration group
CT_CONFIG_API cfg_field_t * config_bool(cfg_group_t *group, const cfg_info_t *info, bool initial)
add a new yes/no field to a configuration group
#define CT_ARG_LONG(name)
CT_CONFIG_API cfg_group_t * config_root(const cfg_info_t *info, arena_t *arena)
create a new configuration group
#define CT_ARG_SHORT(name)
CT_SETUP_API setup_options_t setup_options(version_info_t info, cfg_group_t *root)
setup default options
a choice in a set of options
a choice from a set of options
information about a configuration field
STA_FIELD_STRING const char * name
the name of this field
default options shared by all tools
struct setup_options_t::@170 report
diagnostic reporting options
version information for a driver/interface/plugin