Patch #3346 2012-10-06 17:49

sagan

Update DMD compiler settings for current version
Download
3346-Update_DMD_com.patch (2.7 KB)
Category
Plugin::Bugfix
Status
Accepted
Close date
2012-12-13 15:29
Assigned to
mortenmacfly
Index: src/plugins/compilergcc/resources/compilers/compiler_dmd.xml
===================================================================
--- src/plugins/compilergcc/resources/compilers/compiler_dmd.xml    (Revision 8456)
+++ src/plugins/compilergcc/resources/compilers/compiler_dmd.xml    (Arbeitskopie)
@@ -27,7 +27,7 @@
         <Add><master/><separator/>lib</Add>
     </Path>
     <if platform="windows">
-        <Add lib="phobos.lib"/>
+        <Add lib="phobos2.lib"/>
         <Path type="extra">
             <Add>C:\dm\bin</Add>
         </Path>
@@ -35,6 +35,6 @@
     <else>
         <Add lib="pthread"/>
         <Add lib="m"/>
-        <Add lib="phobos"/>
+        <Add lib="phobos2"/>
     </else>
 </CodeBlocks_compiler>
Index: src/plugins/compilergcc/resources/compilers/options_dmd.xml
===================================================================
--- src/plugins/compilergcc/resources/compilers/options_dmd.xml    (Revision 8456)
+++ src/plugins/compilergcc/resources/compilers/options_dmd.xml    (Arbeitskopie)
@@ -37,15 +37,15 @@
     <else>
         <Program name="C"         value="dmd"/>
         <Program name="CPP"       value="dmd"/>
-        <Program name="LD"        value="gcc"/>
+        <Program name="LD"        value="dmd"/>
         <Program name="DBGconfig" value="gdb_debugger:Default"/>
         <Program name="LIB"       value="ar"/>
         <Program name="WINDRES"   value=""/>
         <Program name="MAKE"      value="make"/>
 
         <Switch name="includeDirs"             value="-I"/>
-        <Switch name="libDirs"                 value="-L"/>
-        <Switch name="linkLibs"                value="-l"/>
+        <Switch name="libDirs"                 value="-L-L"/>
+        <Switch name="linkLibs"                value="-L-l"/>
         <Switch name="defines"                 value="-version="/>
         <Switch name="genericSwitch"           value="-"/>
         <Switch name="objectExtension"         value="o"/>
@@ -61,11 +61,11 @@
         <Command name="CompileResource"
                  value=""/>
         <Command name="LinkExe"
-                 value="$linker -o $exe_output $link_options $link_objects $libs"/>
+                 value="$linker -of$exe_output $link_options $link_objects $libs"/>
         <Command name="LinkConsoleExe"
-                 value="$linker -o $exe_output $link_options $link_objects $libs"/>
+                 value="$linker -of$exe_output $link_options $link_objects $libs"/>
         <Command name="LinkNative"
-                 value="$linker -o $exe_output $link_options $link_objects $libs"/>
+                 value="$linker -of$exe_output $link_options $link_objects $libs"/>
     </else>
     <Command name="CompileObject"
              value="$compiler $options $includes -c $file -of$object"/>
sagan 2012-10-06 17:50

Following changes:

- Make it use dmd to link instead of gcc

- Change the linker command line arguments to match those of dmd

- Make it use libphobos2 instead of the old version

mortenmacfly 2012-10-09 05:11

Please post such patches against the xml_compiler branch (where they may actually no longer be needed). We have re-worked the compiler framework and will switch to this branch any time soon.

Also, feel free to try / switch to this branch already now, if you like. Concerning compiler its much more flexible and usually does no lack any features from trunk.

sagan 2012-10-14 20:50

This is the patch for the xml_compiler branch.

sagan 2012-10-14 20:51

I can't see my upload anywhere, so trying again...

mortenmacfly 2012-12-13 15:22

We have merged the branch finally into trunk.

I am looking into it now again... stay tuned...

mortenmacfly 2012-12-13 15:29

Well that was easy... applied in trunk thanks!