You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-27 15:57:02 +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
@@ -70,6 +70,7 @@ def get_opts():
|
||||
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_msan", "Use LLVM/GCC compiler memory sanitizer (MSAN))", False),
|
||||
BoolVariable("pulseaudio", "Detect and use PulseAudio", True),
|
||||
BoolVariable("udev", "Use udev for gamepad connection callbacks", True),
|
||||
BoolVariable("debug_symbols", "Add debugging symbols to release/release_debug builds", True),
|
||||
@@ -140,7 +141,7 @@ def configure(env):
|
||||
print("Using LLD with GCC is not supported yet, try compiling with 'use_llvm=yes'.")
|
||||
sys.exit(255)
|
||||
|
||||
if env["use_ubsan"] or env["use_asan"] or env["use_lsan"] or env["use_tsan"]:
|
||||
if env["use_ubsan"] or env["use_asan"] or env["use_lsan"] or env["use_tsan"] or env["use_msan"]:
|
||||
env.extra_suffix += "s"
|
||||
|
||||
if env["use_ubsan"]:
|
||||
@@ -172,6 +173,10 @@ def configure(env):
|
||||
env.Append(CCFLAGS=["-fsanitize=thread"])
|
||||
env.Append(LINKFLAGS=["-fsanitize=thread"])
|
||||
|
||||
if env["use_msan"]:
|
||||
env.Append(CCFLAGS=["-fsanitize=memory"])
|
||||
env.Append(LINKFLAGS=["-fsanitize=memory"])
|
||||
|
||||
if env["use_lto"]:
|
||||
if not env["use_llvm"] and env.GetOption("num_jobs") > 1:
|
||||
env.Append(CCFLAGS=["-flto"])
|
||||
|
||||
Reference in New Issue
Block a user