Fix UBSan not available on OS X clang

This commit is contained in:
Kovid Goyal 2017-11-08 17:50:32 +05:30
parent 9bef53459f
commit e8798b5bf2
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -109,7 +109,7 @@ def get_python_flags(cflags):
def get_sanitize_args(cc, ccver): def get_sanitize_args(cc, ccver):
sanitize_args = ['-fsanitize=address'] sanitize_args = ['-fsanitize=address']
if (cc == 'gcc' and ccver >= (5, 0)) or cc == 'clang': if ccver >= (5, 0):
sanitize_args.append('-fsanitize=undefined') sanitize_args.append('-fsanitize=undefined')
# if cc == 'gcc' or (cc == 'clang' and ccver >= (4, 2)): # if cc == 'gcc' or (cc == 'clang' and ccver >= (4, 2)):
# sanitize_args.append('-fno-sanitize-recover=all') # sanitize_args.append('-fno-sanitize-recover=all')