diff options
Diffstat (limited to 'coreconf')
-rw-r--r-- | coreconf/sanitizers.py | 7 | ||||
-rw-r--r-- | coreconf/sanitizers.sh | 5 |
2 files changed, 10 insertions, 2 deletions
diff --git a/coreconf/sanitizers.py b/coreconf/sanitizers.py index 8735aad61..deeb08cba 100644 --- a/coreconf/sanitizers.py +++ b/coreconf/sanitizers.py @@ -5,7 +5,7 @@ import sys def main(): if len(sys.argv) < 2: - raise Exception('Specify either "asan", "msan", "sancov" or "ubsan" as argument.') + raise Exception('Specify either "asan", "msan", "sancov", "sourcecov" or "ubsan" as argument.') sanitizer = sys.argv[1] if sanitizer == "ubsan": @@ -26,8 +26,11 @@ def main(): raise Exception('sancov requires another argument (edge|bb|func).') print('-fsanitize-coverage='+sys.argv[2]+' ', end='') return + if sanitizer == "sourcecov": + print('-fprofile-instr-generate -fcoverage-mapping', end='') + return - raise Exception('Specify either "asan", "msan", "sancov" or "ubsan" as argument.') + raise Exception('Specify either "asan", "msan", "sancov", "sourcecov" or "ubsan" as argument.') if __name__ == '__main__': main() diff --git a/coreconf/sanitizers.sh b/coreconf/sanitizers.sh index bd77571ed..739f831c0 100644 --- a/coreconf/sanitizers.sh +++ b/coreconf/sanitizers.sh @@ -42,6 +42,11 @@ enable_sancov() enable_sanitizer sancov "$sancov" } +enable_sourcecov() +{ + enable_sanitizer sourcecov +} + enable_ubsan() { local ubsan |