1 // main.cc -- gold main function.
15 main(int argc, char** argv)
17 #if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
18 setlocale (LC_MESSAGES, "");
20 #if defined (HAVE_SETLOCALE)
21 setlocale (LC_CTYPE, "");
23 bindtextdomain (PACKAGE, LOCALEDIR);
26 program_name = argv[0];
28 // Handle the command line options.
29 Command_line command_line;
30 command_line.process(argc - 1, argv + 1);
33 Workqueue workqueue(command_line.options());
35 // The list of input objects.
36 Input_objects input_objects;
42 Layout layout(command_line.options());
44 // Get the search path from the -L options.
45 Dirsearch search_path;
46 search_path.add(&workqueue, command_line.options().search_path());
48 // Queue up the first set of tasks.
49 queue_initial_tasks(command_line.options(), search_path,
50 command_line, &workqueue, &input_objects,
53 // Run the main task processing loop.