summaryrefslogtreecommitdiff
path: root/gcc/lto-opts.c
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2012-11-27 13:56:31 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2012-11-27 05:56:31 -0800
commit169d8507caebe73a977bcdb9f16cbb6254e7efd8 (patch)
tree1ba1c003e58f2e70873c2d801c76c88b4b22bb13 /gcc/lto-opts.c
parent5a8608353261070997bb1bc54e16f5eba8436b5d (diff)
downloadgcc-169d8507caebe73a977bcdb9f16cbb6254e7efd8.tar.gz
Handle OPT_SPECIAL_XXX in LTO
PR lto/54795 * lto-opts.c (lto_write_options): Also handle OPT_SPECIAL_unknown, OPT_SPECIAL_ignore and OPT_SPECIAL_program_name. PR lto/55474 * lto-wrapper.c (merge_and_complain): Handle OPT_SPECIAL_unknown, OPT_SPECIAL_ignore, OPT_SPECIAL_program_name and OPT_SPECIAL_input_file. Co-Authored-By: Markus Trippelsdorf <markus@trippelsdorf.de> From-SVN: r193848
Diffstat (limited to 'gcc/lto-opts.c')
-rw-r--r--gcc/lto-opts.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/gcc/lto-opts.c b/gcc/lto-opts.c
index a235f41da8d..a61a26ff56f 100644
--- a/gcc/lto-opts.c
+++ b/gcc/lto-opts.c
@@ -93,6 +93,20 @@ lto_write_options (void)
{
struct cl_decoded_option *option = &save_decoded_options[i];
+ /* Skip explicitly some common options that we do not need. */
+ switch (option->opt_index)
+ {
+ case OPT_dumpbase:
+ case OPT_SPECIAL_unknown:
+ case OPT_SPECIAL_ignore:
+ case OPT_SPECIAL_program_name:
+ case OPT_SPECIAL_input_file:
+ continue;
+
+ default:
+ break;
+ }
+
/* Skip frontend and driver specific options here. */
if (!(cl_options[option->opt_index].flags & (CL_COMMON|CL_TARGET|CL_LTO)))
continue;
@@ -108,17 +122,6 @@ lto_write_options (void)
if (cl_options[option->opt_index].flags & (CL_DRIVER|CL_WARNING))
continue;
- /* Skip explicitly some common options that we do not need. */
- switch (option->opt_index)
- {
- case OPT_dumpbase:
- case OPT_SPECIAL_input_file:
- continue;
-
- default:
- break;
- }
-
for (j = 0; j < option->canonical_option_num_elements; ++j)
append_to_collect_gcc_options (&temporary_obstack, &first_p,
option->canonical_option[j]);