svn commit: r359748 - in stable: 11/lib/clang 11/share/mk 11/tools/build/options 12/lib/clang 12/share/mk 12/tools/build/options
Kyle Evans
kevans at FreeBSD.org
Thu Apr 9 15:58:09 UTC 2020
Author: kevans
Date: Thu Apr 9 15:58:06 2020
New Revision: 359748
URL: https://svnweb.freebsd.org/changeset/base/359748
Log:
MFC r359644: 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.
[MFC note: that last comment just happened for these two branches]
Added:
stable/12/tools/build/options/WITHOUT_LLVM_ASSERTIONS
- copied unchanged from r359644, head/tools/build/options/WITHOUT_LLVM_ASSERTIONS
stable/12/tools/build/options/WITH_LLVM_ASSERTIONS
- copied unchanged from r359644, head/tools/build/options/WITH_LLVM_ASSERTIONS
Modified:
stable/12/lib/clang/llvm.build.mk
stable/12/share/mk/src.opts.mk
Directory Properties:
stable/12/ (props changed)
Changes in other areas also in this revision:
Added:
stable/11/tools/build/options/WITHOUT_LLVM_ASSERTIONS
- copied unchanged from r359644, head/tools/build/options/WITHOUT_LLVM_ASSERTIONS
stable/11/tools/build/options/WITH_LLVM_ASSERTIONS
- copied unchanged from r359644, head/tools/build/options/WITH_LLVM_ASSERTIONS
Modified:
stable/11/lib/clang/llvm.build.mk
stable/11/share/mk/src.opts.mk
Directory Properties:
stable/11/ (props changed)
Modified: stable/12/lib/clang/llvm.build.mk
==============================================================================
--- stable/12/lib/clang/llvm.build.mk Thu Apr 9 15:33:13 2020 (r359747)
+++ stable/12/lib/clang/llvm.build.mk Thu Apr 9 15:58:06 2020 (r359748)
@@ -22,7 +22,9 @@ CFLAGS+= -D__STDC_CONSTANT_MACROS
CFLAGS+= -D__STDC_FORMAT_MACROS
CFLAGS+= -D__STDC_LIMIT_MACROS
CFLAGS+= -DHAVE_VCS_VERSION_INC
+.if ${MK_LLVM_ASSERTIONS} == "no"
CFLAGS+= -DNDEBUG
+.endif
TARGET_ARCH?= ${MACHINE_ARCH}
BUILD_ARCH?= ${MACHINE_ARCH}
Modified: stable/12/share/mk/src.opts.mk
==============================================================================
--- stable/12/share/mk/src.opts.mk Thu Apr 9 15:33:13 2020 (r359747)
+++ stable/12/share/mk/src.opts.mk Thu Apr 9 15:58:06 2020 (r359748)
@@ -202,6 +202,7 @@ __DEFAULT_NO_OPTIONS = \
GNU_GREP_COMPAT \
HESIOD \
LIBSOFT \
+ LLVM_ASSERTIONS \
LOADER_FIREWIRE \
LOADER_FORCE_LE \
LOADER_VERIEXEC_PASS_MANIFEST \
Copied: stable/12/tools/build/options/WITHOUT_LLVM_ASSERTIONS (from r359644, head/tools/build/options/WITHOUT_LLVM_ASSERTIONS)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/12/tools/build/options/WITHOUT_LLVM_ASSERTIONS Thu Apr 9 15:58:06 2020 (r359748, copy of r359644, head/tools/build/options/WITHOUT_LLVM_ASSERTIONS)
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Set to disable debugging assertions in LLVM.
Copied: stable/12/tools/build/options/WITH_LLVM_ASSERTIONS (from r359644, head/tools/build/options/WITH_LLVM_ASSERTIONS)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/12/tools/build/options/WITH_LLVM_ASSERTIONS Thu Apr 9 15:58:06 2020 (r359748, copy of r359644, head/tools/build/options/WITH_LLVM_ASSERTIONS)
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Set to enable debugging assertions in LLVM.
More information about the svn-src-all
mailing list