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
This commit is contained in:
parent
9c2065607f
commit
147d7b567f
@ -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}
|
||||
|
@ -132,6 +132,7 @@ __DEFAULT_YES_OPTIONS = \
|
||||
LLD \
|
||||
LLD_BOOTSTRAP \
|
||||
LLD_IS_LD \
|
||||
LLVM_ASSERTIONS \
|
||||
LLVM_COV \
|
||||
LLVM_TARGET_ALL \
|
||||
LOADER_GELI \
|
||||
|
2
tools/build/options/WITHOUT_LLVM_ASSERTIONS
Normal file
2
tools/build/options/WITHOUT_LLVM_ASSERTIONS
Normal file
@ -0,0 +1,2 @@
|
||||
.\" $FreeBSD$
|
||||
Set to disable debugging assertions in LLVM.
|
2
tools/build/options/WITH_LLVM_ASSERTIONS
Normal file
2
tools/build/options/WITH_LLVM_ASSERTIONS
Normal file
@ -0,0 +1,2 @@
|
||||
.\" $FreeBSD$
|
||||
Set to enable debugging assertions in LLVM.
|
Loading…
Reference in New Issue
Block a user