1 // parameters.cc -- general parameters for a link using gold
6 #include "parameters.h"
11 // Initialize the parameters from the options.
13 Parameters::Parameters(const General_options
* options
)
14 : optimization_level_(options
->optimization_level())
16 if (options
->is_shared())
17 this->output_file_type_
= OUTPUT_SHARED
;
18 else if (options
->is_relocatable())
19 this->output_file_type_
= OUTPUT_OBJECT
;
21 this->output_file_type_
= OUTPUT_EXECUTABLE
;
24 // The global variable.
26 const Parameters
* parameters
;
28 // Initialize the global variable.
31 initialize_parameters(const General_options
* options
)
33 parameters
= new Parameters(options
);
36 } // End namespace gold.