1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Added code coverate support to Godot

This commit is contained in:
Rafał Mikrut
2020-02-26 19:43:03 +01:00
parent 63b0d822d1
commit b2b0210d66
2 changed files with 9 additions and 0 deletions

View File

@@ -32,6 +32,7 @@ def get_opts():
return [
BoolVariable('use_llvm', 'Use the LLVM compiler', False),
BoolVariable('use_static_cpp', 'Link libgcc and libstdc++ statically for better portability', False),
BoolVariable('use_coverage', 'Test Godot coverage', 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),
@@ -99,6 +100,9 @@ def configure(env):
env.Append(CPPDEFINES=['TYPED_METHOD_BIND'])
env.extra_suffix = ".llvm" + env.extra_suffix
if env['use_coverage']:
env.Append(CCFLAGS=['-ftest-coverage', '-fprofile-arcs'])
env.Append(LINKFLAGS=['-ftest-coverage', '-fprofile-arcs'])
if env['use_ubsan'] or env['use_asan'] or env['use_lsan'] or env['use_tsan']:
env.extra_suffix += "s"