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: I759946f4d6e9f103f3c974e020fc218891eda55a
diff --git a/.jenkins.d/30-coverage.sh b/.jenkins.d/30-coverage.sh
index d8c998c..846a14c 100755
--- a/.jenkins.d/30-coverage.sh
+++ b/.jenkins.d/30-coverage.sh
@@ -26,9 +26,9 @@
--capture \
--directory . \
--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 \
@@ -39,5 +39,6 @@
--missed \
--show-proportion \
--title "ndn-tools $(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 ac5cdfd..ec05c6f 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):