global_options.x_flag_objc_abi);
}
- /* Limit DWARF to the chosen version, the linker and debug linker might not
- be able to consume newer structures. */
- if (!OPTION_SET_P (dwarf_strict))
- dwarf_strict = 1;
-
if (!OPTION_SET_P (dwarf_version))
{
/* External toolchains based on LLVM or clang 7+ have support for
OPTION_SET_P (dwarf_split_debug_info) = 0;
}
+ /* Cases where dsymutil will exclude files with .macinfo sections; we are
+ better off forcing the debug level to 2 than completely excluding the
+ files. If strict dwarf is set, then emit the macinfo anyway. */
+ if (debug_info_level == DINFO_LEVEL_VERBOSE
+ && (!OPTION_SET_P (dwarf_strict) || dwarf_strict == 0)
+ && ((dsymutil_version.kind == CLANG && dsymutil_version.major >= 1500)
+ || (dsymutil_version.kind == LLVM && dsymutil_version.major >= 15)))
+ {
+ inform (input_location,
+ "%<-g3%> is not supported by the debug linker in use (set to 2)");
+ debug_info_level = DINFO_LEVEL_NORMAL;
+ }
+
+ /* Limit DWARF to the chosen version, the linker and debug linker might not
+ be able to consume newer structures. */
+ if (!OPTION_SET_P (dwarf_strict))
+ dwarf_strict = 1;
+
/* Do not allow unwind tables to be generated by default for m32.
fnon-call-exceptions will override this, regardless of what we do. */
if (generating_for_darwin_version < 10