Patch #3318 2012-08-18 04:48

kwez

incorrect -debug option for GDC D compiler
Download
3318-incorrect_debu.patch (943 bytes)
Category
Plugin::Bugfix
Status
Accepted
Close date
2012-10-06 04:57
Assigned to
mortenmacfly
Index: src/plugins/compilergcc/compilerGDC.cpp
===================================================================
--- src/plugins/compilergcc/compilerGDC.cpp    (revision 8237)
+++ src/plugins/compilergcc/compilerGDC.cpp    (working copy)
@@ -110,7 +110,7 @@
     category = _("D");
     m_Options.AddOption(_("generate documentation"), _T("-fdoc"), category);
     m_Options.AddOption(_("allow deprecated features"), _T("-fdeprecated"), category);
-    m_Options.AddOption(_("compile in debug code"), _T("-debug"), category);
+    m_Options.AddOption(_("compile in debug code"), _T("-fdebug"), category);
     m_Options.AddOption(_("inline expand functions"), _T("-finline-functions"), category);
     m_Options.AddOption(_("compile release version, which means not generating code for contracts and asserts"), _T("-frelease"), category);
     m_Options.AddOption(_("compile in unittest code, also turns on asserts"), _T("-funittest"), category);
mortenmacfly 2012-08-21 04:50

Can you please provide a patch against the xml_compiler branch? These flags are handled much more flexible there and we will soon switch to this branch anyways...

alpha0010 2012-08-21 13:29
Index: src/plugins/compilergcc/resources/compilers/options_gdc.xml
===================================================================
--- src/plugins/compilergcc/resources/compilers/options_gdc.xml (revision 8243)
+++ src/plugins/compilergcc/resources/compilers/options_gdc.xml (working copy)
@@ -81,7 +81,7 @@
         <Option name="allow deprecated features"
                 option="-fdeprecated"/>
         <Option name="compile in debug code"
-                option="-debug"/>
+                option="-fdebug"/>
         <Option name="inline expand functions"
                 option="-finline-functions"/>
         <Option name="compile release version, which means not generating code
for contracts and asserts"
kwez 2012-08-22 02:15
here is the same patch against the xml_compiler branch


Index: options_gdc.xml
===================================================================
--- options_gdc.xml	(revision 8243)
+++ options_gdc.xml	(working copy)
@@ -81,7 +81,7 @@
         <Option name="allow deprecated features"
                 option="-fdeprecated"/>
         <Option name="compile in debug code"
-                option="-debug"/>
+                option="-fdebug"/>
         <Option name="inline expand functions"
                 option="-finline-functions"/>
         <Option name="compile release version, which means not generating code for contracts and asserts"
mortenmacfly 2012-10-06 04:57

Applied in compiler_xml branch already.