On Thursday, August 11, 2011 11:00 kennytm wrote: > "Jonathan M Davis" <[email protected]> wrote: > [snip] > > > Because that would be inefficient. As it stands, there's no way to > > tell the > > compiler, "use this library in release mode but use this library in > > debug > > mode." > > Can't you use -defaultlib and -debuglib?
So, you could. I didn't know that they existed. I wonder if they were added after previous discussions about this issue, since in previous discussions, those flags never came up, and I've never noticed them before. Just the same, I'm not sure if we actually want to distribute a non-release version of libphobos though. I expect that it would significantly increase the size of the zip file as well as create some level of confusion, and without a standard place to put debug versions of a library, I don't see how it would work with the distro packages. All someone has to do is compile druntime and Phobos to get it themselves, and all of the source is right there. However, they _would_ have to compile the source, which while relatively easy is not something which is immediately obvious how to do. So, I don't know. Maybe they could be released as libphobos_debug.a and go in the same place as libphobos.a (along with whatever the equivalents would be on Windows). I'm not quite sure how this is dealt with in C/C++ land though. IIUC, the closest that you get to a debug build on Linux without building a library yourself is installing the version of a library which includes debug symbols (but it's still compiled in release mode aside from that I believe). I don't know what the situation is on Windows. So, I don't know. On the whole, I don't consider it to be a big deal, but I could see why someone would want it. But I really don't know the best way to handle the situation. - Jonathan M Davis
