diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-06-28 17:00:59 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-06-28 17:00:59 +0000 |
commit | 90336809fc0d2f5971957b8062a1da210e814322 (patch) | |
tree | 3699ee680927bcf6ec7563dbe63b342be826efac /gcc/gcc.c | |
parent | 622e32f7dd058e85c59d8bfa7495f39b09acaa0d (diff) | |
download | gcc-90336809fc0d2f5971957b8062a1da210e814322.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175591 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c index eb917cdd995..2996de40d23 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), |