waf: removed -fcheck-new and added link checks

check for use of new without std::nothrow
This commit is contained in:
Andrew Tridgell 2024-05-27 12:37:26 +10:00
parent aa2f885e2f
commit 07b5ffcc58
2 changed files with 5 additions and 2 deletions

View File

@ -276,7 +276,6 @@ class Board:
'-Werror=implicit-fallthrough',
]
env.CXXFLAGS += [
'-fcheck-new',
'-fsingle-precision-constant',
'-Wno-psabi',
]

View File

@ -162,7 +162,11 @@ def check_elf_symbols(task):
# we use string find on these symbols, so this catches all types of throw
# calls this should catch all uses of exceptions unless the compiler
# manages to inline them
blacklist = ['std::__throw']
blacklist = ['std::__throw',
'operator new[](unsigned int)',
'operator new[](unsigned long)',
'operator new(unsigned int)',
'operator new(unsigned long)']
nmout = subprocess.getoutput("%s -C %s" % (task.env.get_flat('NM'), elfpath))
for b in blacklist: