mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-22 03:46:50 +01:00
Added code coverate support to Godot
This commit is contained in:
parent
51ecd46a06
commit
baa1442c58
@ -35,6 +35,7 @@ def get_opts():
|
||||
EnumVariable("linker", "Linker program", "default", ("default", "bfd", "gold", "lld", "mold")),
|
||||
BoolVariable("use_llvm", "Use the LLVM compiler", False),
|
||||
BoolVariable("use_static_cpp", "Link libgcc and libstdc++ statically for better portability", True),
|
||||
BoolVariable('use_coverage', 'Test Pandemonium 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),
|
||||
@ -126,6 +127,10 @@ def configure(env):
|
||||
else:
|
||||
env.Append(LINKFLAGS=["-fuse-ld=%s" % env["linker"]])
|
||||
|
||||
if env['use_coverage']:
|
||||
env.Append(CCFLAGS=['-ftest-coverage', '-fprofile-arcs'])
|
||||
env.Append(LINKFLAGS=['-ftest-coverage', '-fprofile-arcs'])
|
||||
|
||||
# Sanitizers
|
||||
if env["use_ubsan"] or env["use_asan"] or env["use_lsan"] or env["use_tsan"] or env["use_msan"]:
|
||||
env.extra_suffix += "s"
|
||||
|
@ -67,6 +67,7 @@ def get_opts():
|
||||
EnumVariable("linker", "Linker program", "default", ("default", "bfd", "gold", "lld", "mold")),
|
||||
BoolVariable("use_llvm", "Use the LLVM compiler", False),
|
||||
BoolVariable("use_static_cpp", "Link libgcc and libstdc++ statically for better portability", True),
|
||||
BoolVariable('use_coverage', 'Test Pandemonium 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),
|
||||
@ -170,6 +171,10 @@ def configure(env):
|
||||
else:
|
||||
env.Append(LINKFLAGS=["-fuse-ld=%s" % env["linker"]])
|
||||
|
||||
if env['use_coverage']:
|
||||
env.Append(CCFLAGS=['-ftest-coverage', '-fprofile-arcs'])
|
||||
env.Append(LINKFLAGS=['-ftest-coverage', '-fprofile-arcs'])
|
||||
|
||||
# Sanitizers
|
||||
if env["use_ubsan"] or env["use_asan"] or env["use_lsan"] or env["use_tsan"] or env["use_msan"]:
|
||||
env.extra_suffix += "s"
|
||||
|
Loading…
Reference in New Issue
Block a user