diff options
| author | Rémi Verschelde <remi@verschelde.fr> | 2021-03-02 18:38:02 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-02 18:38:02 +0100 |
| commit | 0c61e9dd081ac5da65276923caaef45f4edbc3a0 (patch) | |
| tree | d6aac1b2912a62ceca20ffcbb36bf8e20b39f015 /platform/osx | |
| parent | 8c45b1d61ca7e29f39dd5cd1a765f81b2780547b (diff) | |
| parent | da35cd2f00414f6294483724297046c0c5ea91e8 (diff) | |
Merge pull request #43947 from winterpixelgames/PR-allow-msan-sanitizer-build-option
consolidating sanitizers and adding MSAN option on platforms that sup…
Diffstat (limited to 'platform/osx')
| -rw-r--r-- | platform/osx/detect.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/platform/osx/detect.py b/platform/osx/detect.py index acea00c5ac..c39a4426be 100644 --- a/platform/osx/detect.py +++ b/platform/osx/detect.py @@ -35,6 +35,7 @@ def get_opts(): 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), ] @@ -131,7 +132,7 @@ def configure(env): env["AS"] = basecmd + "as" env.Append(CPPDEFINES=["__MACPORTS__"]) # hack to fix libvpx MM256_BROADCASTSI128_SI256 define - if env["use_ubsan"] or env["use_asan"] or env["use_tsan"]: + if env["use_ubsan"] or env["use_asan"] or env["use_lsan"] or env["use_tsan"]: env.extra_suffix += "s" if env["use_ubsan"]: @@ -142,6 +143,10 @@ def configure(env): env.Append(CCFLAGS=["-fsanitize=address"]) env.Append(LINKFLAGS=["-fsanitize=address"]) + if env["use_lsan"]: + env.Append(CCFLAGS=["-fsanitize=leak"]) + env.Append(LINKFLAGS=["-fsanitize=leak"]) + if env["use_tsan"]: env.Append(CCFLAGS=["-fsanitize=thread"]) env.Append(LINKFLAGS=["-fsanitize=thread"]) |