aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2011-06-28 18:00:59 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2011-06-28 18:00:59 +0100
commita7d0d30f0b0257d66c13ea9bdd2418acc0e07830 (patch)
tree3699ee680927bcf6ec7563dbe63b342be826efac /gcc/gcc.c
parentcc6aa1000fd895cf12b9c5e7882dd46d34a44270 (diff)
downloadgcc-a7d0d30f0b0257d66c13ea9bdd2418acc0e07830.zip
gcc-a7d0d30f0b0257d66c13ea9bdd2418acc0e07830.tar.gz
gcc-a7d0d30f0b0257d66c13ea9bdd2418acc0e07830.tar.bz2
common.opt (in_lto_p): New Variable entry.
* common.opt (in_lto_p): New Variable entry. * flags.h (in_lto_p): Move to common.opt. * gcc.c: Include params.h. (set_option_handlers): Also use common_handle_option and target_handle_option. (main): Call global_init_params, finish_params and init_options_struct. * opts.c (debug_type_names): Move from toplev.c. (print_filtered_help): Access quiet_flag through opts pointer. (common_handle_option): Return early in the driver for some options. Access in_lto_p, dwarf_version and warn_maybe_uninitialized through opts pointer. * toplev.c (in_lto_p): Move to common.opt. (debug_type_names): Move to opts.c. * Makefile.in (OBJS): Remove opts.o. (OBJS-libcommon-target): Add opts.o. (gcc.o): Update dependencies. From-SVN: r175591
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index eb917cd..2996de4 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -43,6 +43,7 @@ compilation is specified by a string called a "spec". */
#include "diagnostic.h"
#include "flags.h"
#include "opts.h"
+#include "params.h"
#include "vec.h"
#include "filenames.h"
@@ -3532,9 +3533,13 @@ set_option_handlers (struct cl_option_handlers *handlers)
handlers->unknown_option_callback = driver_unknown_option_callback;
handlers->wrong_lang_callback = driver_wrong_lang_callback;
handlers->post_handling_callback = driver_post_handling_callback;
- handlers->num_handlers = 1;
+ handlers->num_handlers = 3;
handlers->handlers[0].handler = driver_handle_option;
handlers->handlers[0].mask = CL_DRIVER;
+ handlers->handlers[1].handler = common_handle_option;
+ handlers->handlers[1].mask = CL_COMMON;
+ handlers->handlers[2].handler = target_handle_option;
+ handlers->handlers[2].mask = CL_TARGET;
}
/* Create the vector `switches' and its contents.
@@ -6156,7 +6161,11 @@ main (int argc, char **argv)
if (argv != old_argv)
at_file_supplied = true;
- global_options = global_options_init;
+ /* Register the language-independent parameters. */
+ global_init_params ();
+ finish_params ();
+
+ init_options_struct (&global_options, &global_options_set);
decode_cmdline_options_to_array (argc, CONST_CAST2 (const char **, char **,
argv),