On Aug 11, 2011, at 10:44 AM, Jonathan M Davis wrote:

> On Thursday, August 11, 2011 06:58 simendsjo wrote:
>> On 11.08.2011 14:56, Vladimir Panteleev wrote:
>> 
>> Which reminds me.. Why isn't a phobos shipped with a precompiled version
>> containing contracts?
> 
> 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."

Yes there is: -debuglib.

I have a few issues with this as DMD currently works, though.  First, whether 
to use checked vs. unchecked code has nothing to do with whether it's "release" 
or "non-release".  The current switch name really has to be changed to 
-unchecked so people aren't tricked into thinking that shipping checked code is 
a bad thing.  Once this is done, the DMD switches -defaultlib and -debuglib 
could be changed to -defaultlib and -uncheckedlib.  Whether or not the user 
supplies the -debug switch should mean nothing insofar as which external 
library is used.  More important is that checking be used throughout or not at 
all.  Once this is sorted, I'd gladly build and ship multiple versions of 
druntime for these configs.

Reply via email to