From owner-svn-src-head@freebsd.org Sun Oct 21 10:42:16 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FC58FEA6CC; Sun, 21 Oct 2018 10:42:16 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DE98C86B98; Sun, 21 Oct 2018 10:42:15 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1354) id D68F516853; Sun, 21 Oct 2018 10:42:15 +0000 (UTC) From: Jan Beich To: Dimitry Andric Cc: Glen Barber , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r339436 - in head: . contrib/gcc gnu/usr.bin/cc/cc_tools lib/clang release sys/conf sys/sys References: <201810190037.w9J0blks031617@repo.freebsd.org> Date: Sun, 21 Oct 2018 12:42:10 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Oct 2018 10:42:16 -0000 Dimitry Andric writes: > On 21 Oct 2018, at 04:08, Jan Beich wrote: > >> >> Glen Barber 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. But this commit is for -CURRENT, not -STABLE or -RELEASE. $ svn cat svn://svn.freebsd.org/base/stable/12/lib/clang/llvm.build.mk | fgrep NDEBUG ~ #CFLAGS+= -DNDEBUG $ svn cat svn://svn.freebsd.org/base/releng/11.2/lib/clang/llvm.build.mk | fgrep NDEBUG CFLAGS+= -DNDEBUG > > 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