diff --git a/src/cfg/opt.h b/src/cfg/opt.h index 4776840..7502d3b 100644 --- a/src/cfg/opt.h +++ b/src/cfg/opt.h @@ -41,6 +41,8 @@ typedef struct TargetLinkConfig_t { bool colorize; char *output_file; char *driver; + // entry point symbol name + char* entry; } TargetLinkConfig; typedef enum TargetCompilationMode_t { diff --git a/src/link/lldc/lldc.c b/src/link/lldc/lldc.c index 39a93ad..aad0e56 100644 --- a/src/link/lldc/lldc.c +++ b/src/link/lldc/lldc.c @@ -30,10 +30,14 @@ bool lldc_link(TargetConfig* target_config, TargetLinkConfig* link_config) { char* linker = "ld.lld"; g_array_append_val(arguments, linker); + if (is_option_set("color-always")) { + char* colored_diagnostics = "--color-diagnostics=always"; + g_array_append_val(arguments, colored_diagnostics); + } + const char* optimization_level = get_optimization_level_string(target_config); g_array_append_val(arguments, optimization_level); - // enable dynamic linker on linux if (extract_sys_from_triple(target_config->triple) == SYS_LINUX) { if (target_has_shared_dependency(link_config))