Date: Sun, 25 Nov 2018 15:43:36 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 233506] devel/llvm70: (and prev versions) LLVM assertions are enabled unintentionally Message-ID: <bug-233506-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D233506 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@FreeBSD.org Reporter: greg@unrelenting.technology Flags: maintainer-feedback?(brooks@FreeBSD.org) Assignee: brooks@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 =E2=80=94 looks like our *FLAGS environment variables = =E2=80=94 overrides CMake's flags and -DNDEBUG is lost. Compare: (in CMakeCache) CMAKE_CXX_FLAGS_RELEASE:STRING=3D-O2 -pipe -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=3D-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 =E2=80=94 I'm seeing the s= ame one in devel/ccls) that no one wants to fix. (And they are deep in clang, not in t= he user of libclang.) // As a workaround, we can add something like: CFLAGS+=3D-DNDEBUG CXXFLAGS+=3D-DNDEBUG --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-233506-7788>