Skip to content

Commit 410520d

Browse files
committed
build: don't bother with _LIBCPP_ENABLE_ASSERTIONS
See named-data/NFD@beb9e85 Change-Id: I736688be78bc9ff4ba54b2aaa71d5868a2bab05d
1 parent 93da5fc commit 410520d

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

.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/PSync/*" \
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 \
@@ -40,5 +40,6 @@ genhtml \
4040
--missed \
4141
--show-proportion \
4242
--title "PSync $(cat VERSION.info)" \
43+
--ignore-errors inconsistent,inconsistent \
4344
--output-directory build/lcov \
4445
build/coverage.info

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

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

259255
def getOptimizedFlags(self, conf):

0 commit comments

Comments
 (0)