Date: Mon, 6 Apr 2020 01:27:18 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359644 - in head: lib/clang share/mk tools/build/options Message-ID: <202004060127.0361RIeR007666@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevans Date: Mon Apr 6 01:27:17 2020 New Revision: 359644 URL: https://svnweb.freebsd.org/changeset/base/359644 Log: llvm: add a build knob for enabling assertions For head/, this will remain eternally default-on to maintain the status quo. For stable/ branches, it should be flipped to default-off to maintain the status quo. There's value in being able to flip it one way or the other easily on head or stable branches, whether you want to gain some performance back on head/ (for machines there's little chance you'll actually hit an assertion) or potentially diagnose a problem with the version of llvm on an older branch. Currently, stable branches get the CFLAGS+= -ndebug line uncommented; going forward, they will instead have the default of LLVM_ASSERTIONS flipped. Reviewed by: dim, emaste, re (gjb) MFC after: 1 week MFC note: flip the default of LLVM_ASSERTIONS Differential Revision: https://reviews.freebsd.org/D24264 Added: head/tools/build/options/WITHOUT_LLVM_ASSERTIONS (contents, props changed) head/tools/build/options/WITH_LLVM_ASSERTIONS (contents, props changed) Modified: head/lib/clang/llvm.build.mk head/share/mk/src.opts.mk Modified: head/lib/clang/llvm.build.mk ============================================================================== --- head/lib/clang/llvm.build.mk Sun Apr 5 21:08:17 2020 (r359643) +++ head/lib/clang/llvm.build.mk Mon Apr 6 01:27:17 2020 (r359644) @@ -22,7 +22,9 @@ CFLAGS+= -D__STDC_CONSTANT_MACROS CFLAGS+= -D__STDC_FORMAT_MACROS CFLAGS+= -D__STDC_LIMIT_MACROS CFLAGS+= -DHAVE_VCS_VERSION_INC -#CFLAGS+= -DNDEBUG +.if ${MK_LLVM_ASSERTIONS} == "no" +CFLAGS+= -DNDEBUG +.endif TARGET_ARCH?= ${MACHINE_ARCH} BUILD_ARCH?= ${MACHINE_ARCH} Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Sun Apr 5 21:08:17 2020 (r359643) +++ head/share/mk/src.opts.mk Mon Apr 6 01:27:17 2020 (r359644) @@ -132,6 +132,7 @@ __DEFAULT_YES_OPTIONS = \ LLD \ LLD_BOOTSTRAP \ LLD_IS_LD \ + LLVM_ASSERTIONS \ LLVM_COV \ LLVM_TARGET_ALL \ LOADER_GELI \ Added: head/tools/build/options/WITHOUT_LLVM_ASSERTIONS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_LLVM_ASSERTIONS Mon Apr 6 01:27:17 2020 (r359644) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to disable debugging assertions in LLVM. Added: head/tools/build/options/WITH_LLVM_ASSERTIONS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_LLVM_ASSERTIONS Mon Apr 6 01:27:17 2020 (r359644) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to enable debugging assertions in LLVM.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004060127.0361RIeR007666>