Skip to content

Commit cb7acd2

Browse files
committed
build: don't bother with _LIBCPP_ENABLE_ASSERTIONS
See named-data/NFD@beb9e85 Change-Id: Idd5cf548da0a2f120258dea518ac76a9c1ea6bf5
1 parent 6d7c37f commit cb7acd2

2 files changed

Lines changed: 9 additions & 12 deletions

File tree

.jenkins.d/30-coverage.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ lcov \
2626
--capture \
2727
--directory . \
2828
--include "$PWD/src/*" \
29-
--ignore-errors count,inconsistent \
3029
--branch-coverage \
3130
--rc no_exception_branch=1 \
31+
--ignore-errors inconsistent,mismatch,mismatch \
3232
--output-file build/coverage.info
3333

3434
genhtml \
@@ -39,5 +39,6 @@ genhtml \
3939
--missed \
4040
--show-proportion \
4141
--title "NLSR $(cat VERSION.info)" \
42+
--ignore-errors inconsistent,inconsistent \
4243
--output-directory build/lcov \
4344
build/coverage.info

.waf-tools/default-compiler-flags.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -241,18 +241,14 @@ def getGeneralFlags(self, conf):
241241
def getDebugFlags(self, conf):
242242
flags = super().getDebugFlags(conf)
243243
flags['CXXFLAGS'] += self.__cxxFlags
244-
ccver = get_compiler_ver(conf)
245-
darwin = Utils.unversioned_sys_platform() == 'darwin'
246-
# Enable assertions in libc++
247-
if (darwin and ccver >= (17, 0, 0)) or (not darwin and ccver >= (18, 0, 0)):
244+
flags['DEFINES'] += [
245+
# Enable assertions in libc++
248246
# https://libcxx.llvm.org/Hardening.html
249-
flags['DEFINES'] += ['_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE']
250-
elif ccver >= (15, 0, 0):
251-
# https://releases.llvm.org/15.0.0/projects/libcxx/docs/UsingLibcxx.html#enabling-the-safe-libc-mode
252-
flags['DEFINES'] += ['_LIBCPP_ENABLE_ASSERTIONS=1']
253-
# Tell libc++ to avoid including transitive headers
254-
# https://libcxx.llvm.org/DesignDocs/HeaderRemovalPolicy.html
255-
flags['DEFINES'] += ['_LIBCPP_REMOVE_TRANSITIVE_INCLUDES=1']
247+
'_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE',
248+
# Disable transitive includes in libc++
249+
# https://libcxx.llvm.org/DesignDocs/HeaderRemovalPolicy.html
250+
'_LIBCPP_REMOVE_TRANSITIVE_INCLUDES=1',
251+
]
256252
return flags
257253

258254
def getOptimizedFlags(self, conf):

0 commit comments

Comments
 (0)