1 // main.cc -- gold main function.
6 #include "parameters.h"
16 main(int argc
, char** argv
)
18 #if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
19 setlocale (LC_MESSAGES
, "");
21 #if defined (HAVE_SETLOCALE)
22 setlocale (LC_CTYPE
, "");
24 bindtextdomain (PACKAGE
, LOCALEDIR
);
27 program_name
= argv
[0];
29 // Handle the command line options.
30 Command_line command_line
;
31 command_line
.process(argc
- 1, argv
+ 1);
32 initialize_parameters(&command_line
.options());
35 Workqueue
workqueue(command_line
.options());
37 // The list of input objects.
38 Input_objects input_objects
;
44 Layout
layout(command_line
.options());
46 // Get the search path from the -L options.
47 Dirsearch search_path
;
48 search_path
.add(&workqueue
, command_line
.options().search_path());
50 // Queue up the first set of tasks.
51 queue_initial_tasks(command_line
.options(), search_path
,
52 command_line
, &workqueue
, &input_objects
,
55 // Run the main task processing loop.