build: don't bother with _LIBCPP_ENABLE_ASSERTIONS
It's a library feature, so the check should be on the libc++ version,
not the compiler. But given that it's already deprecated and superseded
by the hardening mode in newer versions, let's just drop it altogether.
Also, suppress two new errors raised by lcov 2.3.
Change-Id: If17d0a69f910c1c464e9522b04e65102740ccb90
diff --git a/.jenkins.d/30-coverage.sh b/.jenkins.d/30-coverage.sh
index 83edcda..aaab885 100755
--- a/.jenkins.d/30-coverage.sh
+++ b/.jenkins.d/30-coverage.sh
@@ -30,9 +30,9 @@
--include "$PWD/core/*" \
--include "$PWD/daemon/*" \
--include "$PWD/tools/*" \
- --ignore-errors count,inconsistent \
--branch-coverage \
--rc no_exception_branch=1 \
+ --ignore-errors inconsistent,mismatch,mismatch \
--output-file build/coverage.info
genhtml \
@@ -43,5 +43,6 @@
--missed \
--show-proportion \
--title "NFD $(cat VERSION.info)" \
+ --ignore-errors inconsistent,inconsistent \
--output-directory build/lcov \
build/coverage.info
diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py
index f7af660..5c68cbe 100644
--- a/.waf-tools/default-compiler-flags.py
+++ b/.waf-tools/default-compiler-flags.py
@@ -241,18 +241,14 @@
def getDebugFlags(self, conf):
flags = super().getDebugFlags(conf)
flags['CXXFLAGS'] += self.__cxxFlags
- ccver = get_compiler_ver(conf)
- darwin = Utils.unversioned_sys_platform() == 'darwin'
- # Enable assertions in libc++
- if (darwin and ccver >= (17, 0, 0)) or (not darwin and ccver >= (18, 0, 0)):
+ flags['DEFINES'] += [
+ # Enable assertions in libc++
# https://libcxx.llvm.org/Hardening.html
- flags['DEFINES'] += ['_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE']
- elif ccver >= (15, 0, 0):
- # https://releases.llvm.org/15.0.0/projects/libcxx/docs/UsingLibcxx.html#enabling-the-safe-libc-mode
- flags['DEFINES'] += ['_LIBCPP_ENABLE_ASSERTIONS=1']
- # Tell libc++ to avoid including transitive headers
- # https://libcxx.llvm.org/DesignDocs/HeaderRemovalPolicy.html
- flags['DEFINES'] += ['_LIBCPP_REMOVE_TRANSITIVE_INCLUDES=1']
+ '_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE',
+ # Disable transitive includes in libc++
+ # https://libcxx.llvm.org/DesignDocs/HeaderRemovalPolicy.html
+ '_LIBCPP_REMOVE_TRANSITIVE_INCLUDES=1',
+ ]
return flags
def getOptimizedFlags(self, conf):