[Bug 233506] devel/llvm70: (and prev versions) LLVM assertions are enabled unintentionally
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Nov 25 15:43:39 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233506
Bug ID: 233506
Summary: devel/llvm70: (and prev versions) LLVM assertions are
enabled unintentionally
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Individual Port(s)
Assignee: brooks at FreeBSD.org
Reporter: greg at unrelenting.technology
Flags: maintainer-feedback?(brooks at FreeBSD.org)
Assignee: brooks at FreeBSD.org
LLVM's CMake build only enables assertions in Debug builds of LLVM.
The FreeBSD Ports do not set the LLVM_ENABLE_ASSERTIONS CMake variable.
LLVM relies on CMake to automatically add -DNDEBUG in non-Debug builds.
However, something — looks like our *FLAGS environment variables — overrides
CMake's flags and -DNDEBUG is lost.
Compare: (in CMakeCache)
CMAKE_CXX_FLAGS_RELEASE:STRING=-O2 -pipe -fstack-protector -isystem
/usr/local/include -fno-strict-aliasing -isystem /usr/local/include
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
So we're shipping debug assertions in production, and looks like not
intentionally!!
This has exposed a few easily fixable bugs in some tools (e.g. Mull), but it
looks like there are some clang assertions (e.g.
https://github.com/Andersbakken/rtags/issues/586 — I'm seeing the same one in
devel/ccls) that no one wants to fix. (And they are deep in clang, not in the
user of libclang.)
// As a workaround, we can add something like:
CFLAGS+=-DNDEBUG
CXXFLAGS+=-DNDEBUG
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list