You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
add msan sanitizer option for linus/bsd, lsan option for osx
(cherry picked from commit da35cd2f00)
This commit is contained in:
committed by
Rémi Verschelde
parent
3f36ca7323
commit
ced5f5398a
@@ -29,6 +29,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),
|
||||
]
|
||||
|
||||
@@ -127,7 +128,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"]:
|
||||
@@ -138,6 +139,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"])
|
||||
|
||||
Reference in New Issue
Block a user