4 ms·
It's worth mentioning that DMD is a reference compiler and not meant as a production tool. DMD is for fast compile time during dev cycles and testing new langua
by gavinray 4y ago
It's worth mentioning that DMD is a reference compiler and not meant as a production tool. DMD is for fast compile time during dev cycles and testing new language features early.
You've got the LLVM and GCC compilers for production.
The problem with lack of debug info on Windows in D is solved by using LDC with LLDB/GDB to debug
You can also ask the compiler to emit CodeView debugging info if you want to stick with Microsoft stuff
- mattarm 4y agoI don't think "DMD is a reference compiler and not meant as a production tool" is a great way to characterize it. There are certainly valid reasons for choosing LLVM and GCC for "production", but also valid reasons for choosing DMD.
- anta40 4y agoAs far as I know, DMD doesn't offer much optimisations. So you use DMD for development, and once the testing is done, built the production release with LDC or GDC.
- WalterBright 4y agoDMD does do all the basic data flow analysis optimizations, along with register allocation by coloring, etc. The problem is there are just a ton of special cases needed to generate good code, especially with the x86 instruction set which is nothing but special cases <g>. Doing these takes a lot of developer time, one by one.
- Xorlev 4y agoThe author's chief complaint appears to be that dmd produces incorrect debug info on Windows, something I'd expect a reference compiler to do. A reference compiler doesn't have to be fast, but it does need to be correct.
- mhh__ 4y agoDebug info is one of the backend things that does get priority with dmd. It has gotten some performance increases in recent years but these are mostly just a nicety. Personally I have fixed some debug info generation problems so it is being worked on.
- schemescape 4y agoIt wasn’t clear to me: is the debug info wrong or is it just missing because stuff is getting optimized out? Both? I know in the past I had some difficulty in C++ on x64 because variables were getting optimized out (so depending on where you were in the function the variable literally didn’t exist anymore).
- cyber_kinetist 4y agoHe was complaining about the long compile times of LDC2 even in debug mode, and said that it uses too much memory up to the point that the laptop can't handle. So I understand why he was using DMD for development.
- svnpenn 4y ago> LDC LDC for Windows is an awkward experience: https://github.com/ldc-developers/ldc/issues/4047 https://github.com/ldc-developers/ldc/issues/4047
- rlp 4y agoI'm not seeing a major problem here, you just need to install MSVC++ alongside it.