www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Building D compiler in MSVC IDE

reply x-code <x-code ya.ru> writes:
I want to build last D 2.0 compiler in Microsoft Visual Studio IDE.
Prompt me please, what create and adjust *.vcproj project in MSVC
2003/2005/2008 (or *.dsp for VC6) for assembly of the D compiler in
Visual Studio?
I tried this do, but faced that that some files

I have found in sources subprojects which generate the part lacking
sources).
Anyone created the similar projects? If yes, that where possible
download working project?
Mar 25 2009
next sibling parent reply Walter Bright <newshound1 digitalmars.com> writes:
x-code wrote:
 I want to build last D 2.0 compiler in Microsoft Visual Studio IDE.
 Prompt me please, what create and adjust *.vcproj project in MSVC
 2003/2005/2008 (or *.dsp for VC6) for assembly of the D compiler in
 Visual Studio?
 I tried this do, but faced that that some files

 I have found in sources subprojects which generate the part lacking
 sources).
 Anyone created the similar projects? If yes, that where possible
 download working project?
One problem you'll have in using MSVC is MSVC does not support 80 bit long doubles. This will cause problems in doing constant folding of them and writing out the 80 bit values to the object file.
Mar 25 2009
parent Robert Fraser <fraserofthenight gmail.com> writes:
Walter Bright wrote:
 x-code wrote:
 I want to build last D 2.0 compiler in Microsoft Visual Studio IDE.
 Prompt me please, what create and adjust *.vcproj project in MSVC
 2003/2005/2008 (or *.dsp for VC6) for assembly of the D compiler in
 Visual Studio?
 I tried this do, but faced that that some files 

 after
 I have found in sources subprojects which generate the part lacking
 sources).
 Anyone created the similar projects? If yes, that where possible
 download working project?
One problem you'll have in using MSVC is MSVC does not support 80 bit long doubles. This will cause problems in doing constant folding of them and writing out the 80 bit values to the object file.
It does if you really like ASM.
Apr 05 2009
prev sibling next sibling parent Jarrett Billingsley <jarrett.billingsley gmail.com> writes:
On Wed, Mar 25, 2009 at 2:34 PM, x-code <x-code ya.ru> wrote:
 I want to build last D 2.0 compiler in Microsoft Visual Studio IDE.
 Prompt me please, what create and adjust *.vcproj project in MSVC
 2003/2005/2008 (or *.dsp for VC6) for assembly of the D compiler in
 Visual Studio?
 I tried this do, but faced that that some files

 I have found in sources subprojects which generate the part lacking
 sources).
 Anyone created the similar projects? If yes, that where possible
 download working project?
Why bother? Compiling with DMC is easy and takes about 2 minutes.
Mar 25 2009
prev sibling next sibling parent Christopher Wright <dhasenan gmail.com> writes:
x-code wrote:
 I want to build last D 2.0 compiler in Microsoft Visual Studio IDE.
 Prompt me please, what create and adjust *.vcproj project in MSVC
 2003/2005/2008 (or *.dsp for VC6) for assembly of the D compiler in
 Visual Studio?
 I tried this do, but faced that that some files

 I have found in sources subprojects which generate the part lacking
 sources).
 Anyone created the similar projects? If yes, that where possible
 download working project?
The best way would be to define an external task in Visual Studio that runs make using DMC. Then you get the dubious benefits of using VS as an IDE while not wracking your brains over compiling DMD.
Mar 25 2009
prev sibling next sibling parent "Lionello Lunesu" <lionello lunesu.remove.com> writes:
"x-code" <x-code ya.ru> wrote in message 
news:gqdtgd$2g0j$1 digitalmars.com...
I want to build last D 2.0 compiler in Microsoft Visual Studio IDE.
 Prompt me please, what create and adjust *.vcproj project in MSVC
 2003/2005/2008 (or *.dsp for VC6) for assembly of the D compiler in
 Visual Studio?
 I tried this do, but faced that that some files 

 after
 I have found in sources subprojects which generate the part lacking
 sources).
 Anyone created the similar projects? If yes, that where possible
 download working project?
I'm using a VC Makefile project. It even works in VC++ express. Just use Walter's makefile, use "make -fwin32.mak" for the build command line, "make clean -fwin32.mak" for the clean command line. Then, add all *.c and *.h files to the project (doesn't really matter) and I've changed the CFLAGS=-gd -D in the makefile to CFLAGS=-g -D for more debug info (I think...) Pressing F5 will run DMC (...huh?) and compile+link DMD. You can even debug and inspect variables! Breakpoints don't seem to work, however, so you must insert "asm{int 3;}" wherever you want to break. L.
Mar 25 2009
prev sibling parent reply Robert Fraser <fraserofthenight gmail.com> writes:
x-code wrote:
 I want to build last D 2.0 compiler in Microsoft Visual Studio IDE.
 Prompt me please, what create and adjust *.vcproj project in MSVC
 2003/2005/2008 (or *.dsp for VC6) for assembly of the D compiler in
 Visual Studio?
 I tried this do, but faced that that some files

 I have found in sources subprojects which generate the part lacking
 sources).
 Anyone created the similar projects? If yes, that where possible
 download working project?
I spent ~15 hours trying to get LDC to build with it, and eventually basically gave up. It'll build (with some modifications), but there are quite a few issues that prevent it from working right in many cases.
Mar 28 2009
parent reply Tomas Lindquist Olsen <tomas.l.olsen gmail.com> writes:
On Sat, Mar 28, 2009 at 11:49 PM, Robert Fraser
<fraserofthenight gmail.com> wrote:
 x-code wrote:
 I want to build last D 2.0 compiler in Microsoft Visual Studio IDE.
 Prompt me please, what create and adjust *.vcproj project in MSVC
 2003/2005/2008 (or *.dsp for VC6) for assembly of the D compiler in
 Visual Studio?
 I tried this do, but faced that that some files

 I have found in sources subprojects which generate the part lacking
 sources).
 Anyone created the similar projects? If yes, that where possible
 download working project?
I spent ~15 hours trying to get LDC to build with it, and eventually basically gave up. It'll build (with some modifications), but there are quite a few issues that prevent it from working right in many cases.
At the moment, LDC on Windows is pretty much a waste of time, since LLVM only supports Dwarf debug information and exception handling in the backends. This *will* change eventually, but none the less, this has been the situation for more than two years. There seems to be some GSOC proposals that will help if accepted, but anyway ... Btw.., you spent ~15hrs getting LDC to compile with MSVC? O.o What changes did you have to make? Where? Please send us your patches :)
Mar 28 2009
parent Robert Fraser <fraserofthenight gmail.com> writes:
Tomas Lindquist Olsen wrote:
 On Sat, Mar 28, 2009 at 11:49 PM, Robert Fraser
 <fraserofthenight gmail.com> wrote:
 x-code wrote:
 I want to build last D 2.0 compiler in Microsoft Visual Studio IDE.
 Prompt me please, what create and adjust *.vcproj project in MSVC
 2003/2005/2008 (or *.dsp for VC6) for assembly of the D compiler in
 Visual Studio?
 I tried this do, but faced that that some files

 I have found in sources subprojects which generate the part lacking
 sources).
 Anyone created the similar projects? If yes, that where possible
 download working project?
I spent ~15 hours trying to get LDC to build with it, and eventually basically gave up. It'll build (with some modifications), but there are quite a few issues that prevent it from working right in many cases.
At the moment, LDC on Windows is pretty much a waste of time, since LLVM only supports Dwarf debug information and exception handling in the backends. This *will* change eventually, but none the less, this has been the situation for more than two years. There seems to be some GSOC proposals that will help if accepted, but anyway ... Btw.., you spent ~15hrs getting LDC to compile with MSVC? O.o What changes did you have to make? Where? Please send us your patches :)
I submitted it a long time ago here: http://www.dsource.org/projects/ldc/ticket/98 ... However I gave up after realizing just how far LLVM has to come on Windows. It doesn't look like 15 hours of work, but I haven't used VS much at all, and just getting LLVM to build in it is enough of a chore.
Apr 05 2009