On 21 Oct 2018, at 04:08, Jan Beich <jbe...@freebsd.org> wrote:
> 
> Glen Barber <g...@freebsd.org> writes:
> 
>> Modified: head/lib/clang/llvm.build.mk
>> ==============================================================================
>> --- head/lib/clang/llvm.build.mk     Fri Oct 19 00:24:23 2018        
>> (r339435)
>> +++ head/lib/clang/llvm.build.mk     Fri Oct 19 00:37:47 2018        
>> (r339436)
>> @@ -17,7 +17,7 @@ CFLAGS+=   -I${LLVM_SRCS}/include
>> CFLAGS+=     -DLLVM_BUILD_GLOBAL_ISEL
>> CFLAGS+=     -D__STDC_LIMIT_MACROS
>> CFLAGS+=     -D__STDC_CONSTANT_MACROS
>> -#CFLAGS+=   -DNDEBUG
>> +CFLAGS+=    -DNDEBUG
> 
> Would Clang still hit asserts instead of crashing with cryptic messages?

In llvm, assertions (and various other internal consistency checks) are
turned off by defining NDEBUG.  So indeed, if something in the internal
state goes in an unexpected direction, you could get crashes or other
"interesting" effects.

That said, the resulting executable(s) should run somewhat faster, and
be somewhat smaller.  I think we have always done this for stable
branches and releases.

If users encounter such crashes, it will still write reproduction files
(self-contained .c or .cpp file and a shell script), so those can be
included in bug reports, and run on a copy of clang with assertions.

-Dimitry

Attachment: signature.asc
Description: Message signed with OpenPGP

Reply via email to