www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - DMD release build being faster than debug!

reply Per =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
I just noticed that building DMD~master via

     make -f posix.mak BUILD=debug

currently takes 3.2 secs while building it via

     make -f posix.mak BUILD=release

takes only 3.0 secs on my Ubuntu 18.04 64-bit machine!

Are there more DMD switches other than `BUILD=release` I need to 
activate to produce the fastest possible compiler binary? Apart 
for compiling it with LDC, that is.
Oct 05 2018
next sibling parent Per =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
On Friday, 5 October 2018 at 14:11:22 UTC, Per Nordlöw wrote:
 Are there more DMD switches other than `BUILD=release` I need 
 to activate to produce the fastest possible compiler binary? 
 Apart for compiling it with LDC, that is.
Ahh, that wasn't so hard to find once I looked inside the correct posix.mak. I guess I should do make -f posix.mak BUILD=release ENABLE_RELEASE=1
Oct 05 2018
prev sibling parent reply Seb <seb wilzba.ch> writes:
On Friday, 5 October 2018 at 14:11:22 UTC, Per Nordlöw wrote:
 I just noticed that building DMD~master via

     make -f posix.mak BUILD=debug

 currently takes 3.2 secs while building it via

     make -f posix.mak BUILD=release

 takes only 3.0 secs on my Ubuntu 18.04 64-bit machine!

 Are there more DMD switches other than `BUILD=release` I need 
 to activate to produce the fastest possible compiler binary? 
 Apart for compiling it with LDC, that is.
Yeah BUILD more or less only defines in which folder the binaries will be stored as the default BUILD was RELEASE historically and the real release build can take a while and shouldn't be used by default (bad newcomer experience). We tried to change the default BUILD to debug but it was a mess with the CIs :/
Oct 05 2018
parent Per =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
On Friday, 5 October 2018 at 16:57:03 UTC, Seb wrote:
 Yeah BUILD more or less only defines in which folder the 
 binaries will be stored as the default BUILD was RELEASE 
 historically and the real release build can take a while and 
 shouldn't be used by default (bad newcomer experience).
 We tried to change the default BUILD to debug but it was a mess 
 with the CIs :/
Got it. Thanks, Seb.
Oct 05 2018