Page MenuHomeFreeBSD

llvm: add a build knob for enabling assertions
ClosedPublic

Authored by kevans on Apr 2 2020, 8:34 PM.
Tags
None
Referenced Files
F81582514: D24264.id70127.diff
Thu, Apr 18, 11:44 AM
Unknown Object (File)
Feb 24 2024, 4:42 AM
Unknown Object (File)
Feb 23 2024, 7:08 PM
Unknown Object (File)
Feb 23 2024, 7:08 PM
Unknown Object (File)
Feb 23 2024, 7:08 PM
Unknown Object (File)
Feb 23 2024, 2:10 PM
Unknown Object (File)
Jan 17 2024, 3:52 AM
Unknown Object (File)
Dec 11 2023, 4:01 PM

Details

Summary

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.

This would push re@'s post-branch commit from removing the comment marker in lib/clang/llvm.build.mk to flipping the option to __DEFAULT_NO_OPTIONS -- it's unclear if this is acceptable.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Let's call it MK_LLVM_ASSERTIONS since that is the term used by upstream, even though they only use the NDEBUG macro for it. (Upstream uses the CMake configuration option -DLLVM_ENABLE_ASSERTIONS=On). For the rest I'm fine with this patch.

This revision is now accepted and ready to land.Apr 3 2020, 3:36 PM
In D24264#533992, @dim wrote:

Let's call it MK_LLVM_ASSERTIONS since that is the term used by upstream, even though they only use the NDEBUG macro for it. (Upstream uses the CMake configuration option -DLLVM_ENABLE_ASSERTIONS=On). For the rest I'm fine with this patch.

Got it- will change pre-commit, assuming re@ is OK with it.

This revision was automatically updated to reflect the committed changes.