You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Added Thread Sanitizer
This commit is contained in:
@@ -35,6 +35,7 @@ def get_opts():
|
||||
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),
|
||||
EnumVariable('debug_symbols', 'Add debugging symbols to release builds', 'yes', ('yes', 'no', 'full')),
|
||||
BoolVariable('separate_debug_symbols', 'Create a separate file containing debugging symbols', False),
|
||||
BoolVariable('execinfo', 'Use libexecinfo on systems where glibc is not available', False),
|
||||
@@ -99,7 +100,7 @@ def configure(env):
|
||||
env.extra_suffix = ".llvm" + env.extra_suffix
|
||||
|
||||
|
||||
if env['use_ubsan'] or env['use_asan'] or env['use_lsan']:
|
||||
if env['use_ubsan'] or env['use_asan'] or env['use_lsan'] or env['use_tsan']:
|
||||
env.extra_suffix += "s"
|
||||
|
||||
if env['use_ubsan']:
|
||||
@@ -114,6 +115,10 @@ def configure(env):
|
||||
env.Append(CCFLAGS=['-fsanitize=leak'])
|
||||
env.Append(LINKFLAGS=['-fsanitize=leak'])
|
||||
|
||||
if env['use_tsan']:
|
||||
env.Append(CCFLAGS=['-fsanitize=thread'])
|
||||
env.Append(LINKFLAGS=['-fsanitize=thread'])
|
||||
|
||||
if env['use_lto']:
|
||||
env.Append(CCFLAGS=['-flto'])
|
||||
if not env['use_llvm'] and env.GetOption("num_jobs") > 1:
|
||||
|
||||
Reference in New Issue
Block a user