void
print_lto_docs_link ()
{
- const char *url = get_option_url (NULL, OPT_flto);
+ bool print_url = global_dc->printer->url_format != URL_FORMAT_NONE;
+ const char *url = global_dc->get_option_url (global_dc, OPT_flto);
pretty_printer pp;
pp.url_format = URL_FORMAT_DEFAULT;
pp_string (&pp, "see the ");
- pp_begin_url (&pp, url);
+ if (print_url)
+ pp_begin_url (&pp, url);
pp_string (&pp, "%<-flto%> option documentation");
- pp_end_url (&pp);
+ if (print_url)
+ pp_end_url (&pp);
pp_string (&pp, " for more information");
inform (UNKNOWN_LOCATION, pp_formatted_text (&pp));
}
incoming_dumppfx = dumppfx = option->arg;
break;
+ case OPT_fdiagnostics_urls_:
+ diagnostic_urls_init (global_dc, option->value);
+ break;
+
+ case OPT_fdiagnostics_color_:
+ diagnostic_color_init (global_dc, option->value);
+ break;
+
default:
break;
}
gcc_init_libintl ();
diagnostic_initialize (global_dc, 0);
+ diagnostic_color_init (global_dc);
+ diagnostic_urls_init (global_dc);
+ global_dc->get_option_url = get_option_url;
if (atexit (lto_wrapper_cleanup) != 0)
fatal_error (input_location, "%<atexit%> failed");