feat: added support for color-always option for ld.lld
This commit is contained in:
parent
3025ff3203
commit
044a11f28c
|
@ -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 {
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue