Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Entry point of cc1, cc1plus, jc1, f771, etc.
- Exit code is FATAL_EXIT_CODE if can't open files or if there were
- any errors, or SUCCESS_EXIT_CODE if compilation succeeded.
- It is not safe to call this function more than once. */
- int
- toplev_main (int argc, char **argv)
- {
- expandargv (&argc, &argv);
- save_argv = CONST_CAST2 (const char **, char **, argv);
- /* Initialization of GCC's environment, and diagnostics. */
- general_init (argv[0]);
- /* Parse the options and do minimal processing; basically just
- enough to default flags appropriately. */
- decode_options (argc, CONST_CAST2 (const char **, char **, argv));
- init_local_tick ();
- initialize_plugins ();
- if (version_flag)
- print_version (stderr, "");
- if (help_flag)
- print_plugins_help (stderr, "");
- /* Exit early if we can (e.g. -help). */
- if (!exit_after_options)
- do_compile ();
- if (warningcount || errorcount)
- print_ignored_options ();
- /* Invoke registered plugin callbacks if any. */
- invoke_plugin_callbacks (PLUGIN_FINISH, NULL);
- finalize_plugins ();
- if (errorcount || sorrycount)
- return (FATAL_EXIT_CODE);
- return (SUCCESS_EXIT_CODE);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement