digitalmars.D - Predefined 'release' version?
- H. S. Teoh (11/11) Apr 20 2012 I just discovered to my dismay that dmd does not define version=release
- Bernard Helyer (6/20) Apr 20 2012 debug {
- =?UTF-8?B?QWxpIMOHZWhyZWxp?= (4/22) Apr 20 2012 debug blocks are activated when -debug switch is explicitly specified,
- Xinok (2/32) Apr 20 2012 The code in "else" will be used in release builds.
- =?UTF-8?B?QWxpIMOHZWhyZWxp?= (7/35) Apr 20 2012 Define "release build". :) Despite appearances -debug and -release are
- Jonathan M Davis (7/14) Apr 20 2012 That's why I always try and avoid the term "debug build." I always talk ...
I just discovered to my dismay that dmd does not define version=release when compiling in -release mode. What's the reason for this? I have some code that uses ctRegex, which slows down compilation significantly due to heavy amounts of CTFE, but which speeds up the final executable. I'd like to version this code and use regular regex() for non-release builds, and switch to ctRegex for release builds. Yes I can just pass in a version on the commandline, but it'd be nice if it could be triggered automatically by -release. T -- Computerese Irregular Verb Conjugation: I have preferences. You have biases. He/She has prejudices. -- Gene Wirchenko
Apr 20 2012
On Friday, 20 April 2012 at 15:26:24 UTC, H. S. Teoh wrote:I just discovered to my dismay that dmd does not define version=release when compiling in -release mode. What's the reason for this? I have some code that uses ctRegex, which slows down compilation significantly due to heavy amounts of CTFE, but which speeds up the final executable. I'd like to version this code and use regular regex() for non-release builds, and switch to ctRegex for release builds. Yes I can just pass in a version on the commandline, but it'd be nice if it could be triggered automatically by -release. Tdebug { // blah } else { // fast blah }
Apr 20 2012
On 04/20/2012 10:24 AM, Bernard Helyer wrote:On Friday, 20 April 2012 at 15:26:24 UTC, H. S. Teoh wrote:debug blocks are activated when -debug switch is explicitly specified, not when -release is not specified. :) AliI just discovered to my dismay that dmd does not define version=release when compiling in -release mode. What's the reason for this? I have some code that uses ctRegex, which slows down compilation significantly due to heavy amounts of CTFE, but which speeds up the final executable. I'd like to version this code and use regular regex() for non-release builds, and switch to ctRegex for release builds. Yes I can just pass in a version on the commandline, but it'd be nice if it could be triggered automatically by -release. Tdebug { // blah } else { // fast blah }
Apr 20 2012
On Friday, 20 April 2012 at 17:43:49 UTC, Ali Çehreli wrote:On 04/20/2012 10:24 AM, Bernard Helyer wrote:The code in "else" will be used in release builds.On Friday, 20 April 2012 at 15:26:24 UTC, H. S. Teoh wrote:debug blocks are activated when -debug switch is explicitly specified, not when -release is not specified. :) AliI just discovered to my dismay that dmd does not define version=release when compiling in -release mode. What's the reason for this? I have some code that uses ctRegex, which slows down compilation significantly due to heavy amounts of CTFE, but which speeds up the final executable. I'd like to version this code and use regular regex() for non-release builds, and switch to ctRegex for release builds. Yes I can just pass in a version on the commandline, but it'd be nice if it could be triggered automatically by -release. Tdebug { // blah } else { // fast blah }
Apr 20 2012
On 04/20/2012 11:14 AM, Xinok wrote:On Friday, 20 April 2012 at 17:43:49 UTC, Ali Çehreli wrote:Define "release build". :) Despite appearances -debug and -release are othogonal. debug blocks are activated by the -debug switch. -release is unrelated to -debug. You can use both switches: http://dlang.org/dmd-linux.html AliOn 04/20/2012 10:24 AM, Bernard Helyer wrote:The code in "else" will be used in release builds.On Friday, 20 April 2012 at 15:26:24 UTC, H. S. Teoh wrote:debug blocks are activated when -debug switch is explicitly specified, not when -release is not specified. :) AliI just discovered to my dismay that dmd does not define version=release when compiling in -release mode. What's the reason for this? I have some code that uses ctRegex, which slows down compilation significantly due to heavy amounts of CTFE, but which speeds up the final executable. I'd like to version this code and use regular regex() for non-release builds, and switch to ctRegex for release builds. Yes I can just pass in a version on the commandline, but it'd be nice if it could be triggered automatically by -release. Tdebug { // blah } else { // fast blah }
Apr 20 2012
On Friday, April 20, 2012 11:26:47 Ali Çehreli wrote:Define "release build". :) Despite appearances -debug and -release are othogonal. debug blocks are activated by the -debug switch. -release is unrelated to -debug. You can use both switches: http://dlang.org/dmd-linux.htmlThat's why I always try and avoid the term "debug build." I always talk about release and non-release or -release and non -release. I don't know what would be better name than debug (for the block statements) and -debug, but when combined with the typical terminology of release build vs debug build, it becomes very confusing. - Jonathan M Davis
Apr 20 2012