[gcc(refs/users/ibuclaw/heads/darwin)] darwin: Don't set dwarf_strict for D front-end

Iain Buclaw ibuclaw@gcc.gnu.org
Mon Nov 30 09:17:30 GMT 2020


https://gcc.gnu.org/g:a22ca6f06eba298df3b85d8ca98cb2929757c599

commit a22ca6f06eba298df3b85d8ca98cb2929757c599
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Mon Nov 30 10:13:47 2020 +0100

    darwin: Don't set dwarf_strict for D front-end

Diff:
---
 gcc/config/darwin.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 3265e3e6cb7..9c19b6e8f1e 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -97,6 +97,9 @@ static GTY(()) vec<cdtor_record, va_gc> *dtors = NULL;
    functions).  */
 int darwin_running_cxx;
 
+/* A flag to determine whether we are running D.  */
+int darwin_running_d;
+
 /* Some code-gen now depends on OS major version numbers (at least).  */
 int generating_for_darwin_version ;
 
@@ -3264,9 +3267,11 @@ darwin_override_options (void)
 		  global_options.x_flag_objc_abi);
     }
 
+  darwin_running_d = (strcmp (lang_hooks.name, "GNU D") == 0);
+
   /* Don't emit DWARF3/4 unless specifically selected.  This is a
      workaround for tool bugs.  */
-  if (!global_options_set.x_dwarf_strict)
+  if (!global_options_set.x_dwarf_strict && !darwin_running_d)
     dwarf_strict = 1;
   if (!global_options_set.x_dwarf_version)
     dwarf_version = 2;


More information about the Gcc-cvs mailing list