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
Unknown Object (File)
Sat, Dec 14, 1:35 AM
Unknown Object (File)
Thu, Dec 5, 10:30 PM
Unknown Object (File)
Nov 19 2024, 8:45 PM
Unknown Object (File)
Nov 16 2024, 1:01 PM
Unknown Object (File)
Oct 6 2024, 1:52 AM
Unknown Object (File)
Sep 24 2024, 4:08 AM
Unknown Object (File)
Sep 23 2024, 11:36 AM
Unknown Object (File)
Aug 18 2024, 9:16 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.