Asserts in C++ code not working for debug builds?

Johan Engelen via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Fri Jul 8 13:10:37 PDT 2016


Hi all,
   I just had a PR fail a CI test because of an assert being 
triggered. But... I am on the same platform (Mac), doing the same 
build (Debug), or so I thought.
Indeed, if I change an assert to something bad (i.e. remove a 
"!"), nothing happens.

What's wrong with my setup? I am compiling LDC in debug mode, but 
I am using a release-mode LLVM (speed...). This means llvm-config 
will return "-DNDEBUG" as one of the --cxxflags, and all my 
asserts are disabled. (It also sets "-O3" for the LDC build)

Advice?

-Johan



More information about the digitalmars-d-ldc mailing list