#include "system.h"
#include "intl.h"
#include "coretypes.h"
-#include "tm.h" /* Needed by rtl.h and used for STACK_CHECK_BUILTIN,
+#include "tm.h" /* For STACK_CHECK_BUILTIN,
STACK_CHECK_STATIC_BUILTIN, DEFAULT_GDB_EXTENSIONS,
DWARF2_DEBUGGING_INFO and DBX_DEBUGGING_INFO. */
-#include "rtl.h" /* Needed by insn-attr.h. */
#include "opts.h"
#include "options.h"
#include "flags.h"
#include "params.h"
#include "diagnostic.h"
#include "opts-diagnostic.h"
-#include "insn-attr.h" /* For INSN_SCHEDULING and DELAY_SLOTS. */
-#include "target.h"
+#include "insn-attr-common.h"
#include "common/common-target.h"
+/* Indexed by enum debug_info_type. */
+const char *const debug_type_names[] =
+{
+ "none", "stabs", "coff", "dwarf-2", "xcoff", "vms"
+};
+
/* Parse the -femit-struct-debug-detailed option value
and set the flag variables. */
{ OPT_LEVELS_1_PLUS, OPT_fipa_reference, NULL, 1 },
{ OPT_LEVELS_1_PLUS, OPT_fipa_profile, NULL, 1 },
{ OPT_LEVELS_1_PLUS, OPT_fmerge_constants, NULL, 1 },
+ { OPT_LEVELS_1_PLUS, OPT_fshrink_wrap, NULL, 1 },
{ OPT_LEVELS_1_PLUS, OPT_fsplit_wide_types, NULL, 1 },
{ OPT_LEVELS_1_PLUS, OPT_ftree_ccp, NULL, 1 },
{ OPT_LEVELS_1_PLUS, OPT_ftree_bit_ccp, NULL, 1 },
{ OPT_LEVELS_2_PLUS, OPT_falign_jumps, NULL, 1 },
{ OPT_LEVELS_2_PLUS, OPT_falign_labels, NULL, 1 },
{ OPT_LEVELS_2_PLUS, OPT_falign_functions, NULL, 1 },
+ { OPT_LEVELS_2_PLUS, OPT_ftree_tail_merge, NULL, 1 },
+ { OPT_LEVELS_2_PLUS_SPEED_ONLY, OPT_foptimize_strlen, NULL, 1 },
/* -O3 optimizations. */
{ OPT_LEVELS_3_PLUS, OPT_ftree_loop_distribute_patterns, NULL, 1 },
maybe_set_param_value (PARAM_STACK_FRAME_GROWTH, 40,
opts->x_param_values, opts_set->x_param_values);
}
- if (opts->x_flag_wpa || opts->x_flag_ltrans)
- {
- /* These passes are not WHOPR compatible yet. */
- opts->x_flag_ipa_pta = 0;
- }
if (opts->x_flag_lto)
{
#else
error_at (loc, "LTO support has not been enabled in this configuration");
#endif
- }
+ if (!opts->x_flag_fat_lto_objects && !HAVE_LTO_PLUGIN)
+ error_at (loc, "-fno-fat-lto-objects are supported only with linker plugin.");
+}
if ((opts->x_flag_lto_partition_balanced != 0) + (opts->x_flag_lto_partition_1to1 != 0)
+ (opts->x_flag_lto_partition_none != 0) >= 1)
{
/* With the -Q option enabled we change the descriptive text associated
with an option to be an indication of its current setting. */
- if (!quiet_flag)
+ if (!opts->x_quiet_flag)
{
void *flag_var = option_flag_var (i, opts);
/* Sanity check: Make sure that we do not have more
languages than we have bits available to enumerate them. */
- gcc_assert ((1U << cl_lang_count) < CL_MIN_OPTION_CLASS);
+ gcc_assert ((1U << cl_lang_count) <= CL_MIN_OPTION_CLASS);
/* If we have not done so already, obtain
the desired maximum width of the output. */
unsigned int undoc_mask;
unsigned int i;
+ if (lang_mask == CL_DRIVER)
+ break;;
+
undoc_mask = ((opts->x_verbose_flag | opts->x_extra_warnings)
? 0
: CL_UNDOCUMENTED);
}
case OPT__target_help:
+ if (lang_mask == CL_DRIVER)
+ break;
+
print_specific_help (CL_TARGET, CL_UNDOCUMENTED, 0, opts, lang_mask);
opts->x_exit_after_options = true;
-
- /* Allow the target a chance to give the user some additional information. */
- if (targetm.help)
- targetm.help ();
break;
case OPT__help_:
--help=target,^undocumented */
unsigned int exclude_flags = 0;
+ if (lang_mask == CL_DRIVER)
+ break;
+
/* Walk along the argument string, parsing each word in turn.
The format is:
arg = [^]{word}[,{arg}]
}
case OPT__version:
+ if (lang_mask == CL_DRIVER)
+ break;
+
opts->x_exit_after_options = true;
break;
break;
case OPT_Werror_:
+ if (lang_mask == CL_DRIVER)
+ break;
+
enable_warning_as_error (arg, value, lang_mask, handlers,
opts, opts_set, loc, dc);
break;
/* FIXME: Instrumentation we insert makes ipa-reference bitmaps
quadratic. Disable the pass until better memory representation
is done. */
- if (!opts_set->x_flag_ipa_reference && in_lto_p)
+ if (!opts_set->x_flag_ipa_reference && opts->x_in_lto_p)
opts->x_flag_ipa_reference = false;
break;
if (value < 2 || value > 4)
error_at (loc, "dwarf version %d is not supported", value);
else
- dwarf_version = value;
+ opts->x_dwarf_version = value;
set_debug_level (DWARF2_DEBUG, false, "", opts, opts_set, loc);
break;
case OPT_Wuninitialized:
/* Also turn on maybe uninitialized warning. */
- warn_maybe_uninitialized = value;
+ opts->x_warn_maybe_uninitialized = value;
break;
default: