diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-04-15 22:55:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-15 22:55:45 +0200 |
commit | 75875c068554e5747e671e3c49aefdfc895567b4 (patch) | |
tree | 01cfdb322c3c18238c9f1e363a1911115e6e464e /platform/osx/detect.py | |
parent | 3890870275202a344ccfd368645e8b2a97968a50 (diff) | |
parent | f827bcd2f31ab742b7bd2c6ccf558a4159dbae98 (diff) | |
download | redot-engine-75875c068554e5747e671e3c49aefdfc895567b4.tar.gz |
Merge pull request #40924 from qarmin/more_undefined_flags
Diffstat (limited to 'platform/osx/detect.py')
-rw-r--r-- | platform/osx/detect.py | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/platform/osx/detect.py b/platform/osx/detect.py index 5b320da82f..afdafe75e5 100644 --- a/platform/osx/detect.py +++ b/platform/osx/detect.py @@ -34,9 +34,9 @@ def get_opts(): BoolVariable("debug_symbols", "Add debugging symbols to release/release_debug builds", True), BoolVariable("separate_debug_symbols", "Create a separate file containing debugging symbols", False), BoolVariable("use_ubsan", "Use LLVM/GCC compiler undefined behavior sanitizer (UBSAN)", False), - BoolVariable("use_asan", "Use LLVM/GCC compiler address sanitizer (ASAN))", False), - BoolVariable("use_lsan", "Use LLVM/GCC compiler leak sanitizer (LSAN))", False), - BoolVariable("use_tsan", "Use LLVM/GCC compiler thread sanitizer (TSAN))", False), + BoolVariable("use_asan", "Use LLVM/GCC compiler address sanitizer (ASAN)", False), + BoolVariable("use_lsan", "Use LLVM/GCC compiler leak sanitizer (LSAN)", False), + BoolVariable("use_tsan", "Use LLVM/GCC compiler thread sanitizer (TSAN)", False), ] @@ -136,11 +136,23 @@ def configure(env): env.extra_suffix += "s" if env["use_ubsan"]: - env.Append(CCFLAGS=["-fsanitize=undefined"]) + env.Append( + CCFLAGS=[ + "-fsanitize=undefined,shift,shift-exponent,integer-divide-by-zero,unreachable,vla-bound,null,return,signed-integer-overflow,bounds,float-divide-by-zero,float-cast-overflow,nonnull-attribute,returns-nonnull-attribute,bool,enum,vptr,pointer-overflow,builtin" + ] + ) env.Append(LINKFLAGS=["-fsanitize=undefined"]) + if env["use_llvm"]: + env.Append( + CCFLAGS=[ + "-fsanitize=nullability-return,nullability-arg,function,nullability-assign,implicit-integer-sign-change,implicit-signed-integer-truncation,implicit-unsigned-integer-truncation" + ] + ) + else: + env.Append(CCFLAGS=["-fsanitize=bounds-strict"]) if env["use_asan"]: - env.Append(CCFLAGS=["-fsanitize=address"]) + env.Append(CCFLAGS=["-fsanitize=address,pointer-subtract,pointer-compare"]) env.Append(LINKFLAGS=["-fsanitize=address"]) if env["use_lsan"]: |