Skip to content

Commit d19bb1a

Browse files
committed
- enable optimizations in release config by default
- add DMD/LDC template
1 parent 58d5799 commit d19bb1a

File tree

6 files changed

+125
-2
lines changed

6 files changed

+125
-2
lines changed

CHANGES

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,12 @@ unreleased Version 0.3.42
733733
for build error with DustMite
734734
* update "Build Phobos Browse Info" and "Build local version of phobos" for dmd 2.067+
735735
* cv2pdb:
736-
- last version introduced crashes with DWARF conversions
737-
- DWARF debug info now stripped from executable
736+
- improved DWARF support:
737+
- last version introduced crashes with DWARF conversions
738+
- now supports info in sections .debug_frame and .debug_loc for better display of locals
739+
- DWARF debug info now stripped from executable
738740
- support for mspdb140.dll from VS2015
741+
- now writes correct machine type to PDB for x64
742+
* add integration into the Visual Studio Performance Wizard
743+
* added project template for console application built with DMD/LDC and x86/x64
744+
* bugzilla 14706: release configurations now enable optimizations and inlining by default

visuald/Templates/ProjectItems/ConsoleDMDGDC/ConsoleApp.visualdproj

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
<Config name="Release DMD" platform="Win32">
1212
<isX86_64>0</isX86_64>
1313
<compiler>0</compiler>
14+
<runCv2pdb>0</runCv2pdb>
15+
<release>1</release>
16+
<optimize>1</optimize>
17+
<useInline>1</useInline>
1418
<outdir>$(ConfigurationName) $(PlatformName)</outdir>
1519
</Config>
1620
<Config name="Debug DMD" platform="x64">
@@ -24,6 +28,10 @@
2428
<Config name="Release DMD" platform="x64">
2529
<isX86_64>1</isX86_64>
2630
<compiler>0</compiler>
31+
<runCv2pdb>0</runCv2pdb>
32+
<release>1</release>
33+
<optimize>1</optimize>
34+
<useInline>1</useInline>
2735
<outdir>$(ConfigurationName) $(PlatformName)</outdir>
2836
</Config>
2937
<Config name="Debug GDC" platform="Win32">
@@ -37,6 +45,10 @@
3745
<Config name="Release GDC" platform="Win32">
3846
<isX86_64>0</isX86_64>
3947
<compiler>1</compiler>
48+
<runCv2pdb>0</runCv2pdb>
49+
<release>1</release>
50+
<optimize>1</optimize>
51+
<useInline>1</useInline>
4052
<outdir>$(ConfigurationName) $(PlatformName)</outdir>
4153
</Config>
4254
<Config name="Debug GDC" platform="x64">
@@ -50,6 +62,10 @@
5062
<Config name="Release GDC" platform="x64">
5163
<isX86_64>1</isX86_64>
5264
<compiler>1</compiler>
65+
<runCv2pdb>0</runCv2pdb>
66+
<release>1</release>
67+
<optimize>1</optimize>
68+
<useInline>1</useInline>
5369
<outdir>$(ConfigurationName) $(PlatformName)</outdir>
5470
</Config>
5571
<Folder name="$safeprojectname$">
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<DProject>
2+
<ProjectGuid>$guid1$</ProjectGuid>
3+
<Config name="Debug DMD" platform="Win32">
4+
<isX86_64>0</isX86_64>
5+
<compiler>0</compiler>
6+
<runCv2pdb>1</runCv2pdb>
7+
<symdebug>1</symdebug>
8+
<release>0</release>
9+
<outdir>$(ConfigurationName) $(PlatformName)</outdir>
10+
</Config>
11+
<Config name="Release DMD" platform="Win32">
12+
<isX86_64>0</isX86_64>
13+
<compiler>0</compiler>
14+
<runCv2pdb>0</runCv2pdb>
15+
<release>1</release>
16+
<optimize>1</optimize>
17+
<useInline>1</useInline>
18+
<outdir>$(ConfigurationName) $(PlatformName)</outdir>
19+
</Config>
20+
<Config name="Debug DMD" platform="x64">
21+
<isX86_64>1</isX86_64>
22+
<compiler>0</compiler>
23+
<runCv2pdb>1</runCv2pdb>
24+
<symdebug>1</symdebug>
25+
<release>0</release>
26+
<outdir>$(ConfigurationName) $(PlatformName)</outdir>
27+
</Config>
28+
<Config name="Release DMD" platform="x64">
29+
<isX86_64>1</isX86_64>
30+
<compiler>0</compiler>
31+
<runCv2pdb>0</runCv2pdb>
32+
<release>1</release>
33+
<optimize>1</optimize>
34+
<useInline>1</useInline>
35+
<outdir>$(ConfigurationName) $(PlatformName)</outdir>
36+
</Config>
37+
<Config name="Debug LDC" platform="Win32">
38+
<isX86_64>0</isX86_64>
39+
<compiler>2</compiler>
40+
<runCv2pdb>1</runCv2pdb>
41+
<symdebug>1</symdebug>
42+
<release>0</release>
43+
<outdir>$(ConfigurationName) $(PlatformName)</outdir>
44+
</Config>
45+
<Config name="Release LDC" platform="Win32">
46+
<isX86_64>0</isX86_64>
47+
<compiler>2</compiler>
48+
<runCv2pdb>0</runCv2pdb>
49+
<release>1</release>
50+
<optimize>1</optimize>
51+
<useInline>1</useInline>
52+
<outdir>$(ConfigurationName) $(PlatformName)</outdir>
53+
</Config>
54+
<Config name="Debug LDC" platform="x64">
55+
<isX86_64>1</isX86_64>
56+
<compiler>2</compiler>
57+
<outdir>$(ConfigurationName) $(PlatformName)</outdir>
58+
<runCv2pdb>1</runCv2pdb>
59+
<symdebug>1</symdebug>
60+
<release>0</release>
61+
</Config>
62+
<Config name="Release LDC" platform="x64">
63+
<isX86_64>1</isX86_64>
64+
<compiler>2</compiler>
65+
<runCv2pdb>0</runCv2pdb>
66+
<release>1</release>
67+
<optimize>1</optimize>
68+
<useInline>1</useInline>
69+
<outdir>$(ConfigurationName) $(PlatformName)</outdir>
70+
</Config>
71+
<Folder name="$safeprojectname$">
72+
<File path="main.d"></File>
73+
</Folder>
74+
</DProject>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<VSTemplate Version="2.0.0" Type="Project" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
2+
<TemplateData>
3+
<Name>Console Application DMD/LDC x86/x64</Name>
4+
<Description>A project for creating a command-line application with DMD/LDC for x86/x64</Description>
5+
<Icon>__TemplateIcon.ico</Icon>
6+
<ProjectType>D</ProjectType>
7+
<SortOrder>50</SortOrder>
8+
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
9+
<CreateNewFolder>true</CreateNewFolder>
10+
<DefaultName>ConsoleApplication</DefaultName>
11+
<ProvideDefaultName>true</ProvideDefaultName>
12+
</TemplateData>
13+
<TemplateContent>
14+
<Project File="ConsoleApp.visualdproj" ReplaceParameters="true">
15+
<ProjectItem ReplaceParameters="true" OpenInEditor="true">main.d</ProjectItem>
16+
</Project>
17+
</TemplateContent>
18+
</VSTemplate>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import std.stdio;
2+
3+
int main(string[] argv)
4+
{
5+
writeln("Hello D-World!");
6+
return 0;
7+
}

visuald/config.d

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,8 @@ class ProjectOptions
292292
runCv2pdb = dbg;
293293
symdebug = dbg ? 1 : 0;
294294
release = dbg ? 0 : 1;
295+
optimize = release;
296+
useInline = release;
295297
}
296298
void setX64(bool x64)
297299
{

0 commit comments

Comments
 (0)