[LLVMdev] Labeling builds as Release/Debug (was: -version displays DEBUG on Visual C++ release build)

Russell Wallace russell.wallace at gmail.com
Mon Feb 15 04:17:27 PST 2010


On Mon, Feb 15, 2010 at 11:57 AM, Óscar Fuentes <ofv at wanadoo.es> wrote:
> This doesn't seems right to me. A debug build is has debug symbols and
> asserts enabled, while a release build has not. The activation of
> optimizations doesn't imply a release build. A slightly better criteria
> is the presence of NDEBUG, which is enabled by default on release builds
> by configure and cmake, and has the advantage of being portable.

Yeah, NDEBUG is the criterion I'm using for my own code. But the
existing code does use __OPTIMIZE__, so right now that does need to be
set to get the correct version display on the release build. It adds
an additional note as to whether NDEBUG was set.




More information about the llvm-dev mailing list