summaryrefslogtreecommitdiff
path: root/platform/osx/detect.py
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-10-29 06:57:44 +0200
committerGitHub <noreply@github.com>2021-10-29 06:57:44 +0200
commit93078089878296cca7548692fd2e472898379d1c (patch)
tree710abce0c83545c4023043c480689ec3a8e367f7 /platform/osx/detect.py
parentd3547be9ae8ae8bfbbece4757fc0759b712354a7 (diff)
parent753836c373340286d39f510edb0fd21773ccd6e6 (diff)
Merge pull request #54364 from skimmedsquare/osx-coverage
Adds support for 'use_coverage' flag in OSX.
Diffstat (limited to 'platform/osx/detect.py')
-rw-r--r--platform/osx/detect.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/osx/detect.py b/platform/osx/detect.py
index 36fff4e12a..6c07c2416e 100644
--- a/platform/osx/detect.py
+++ b/platform/osx/detect.py
@@ -31,6 +31,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_tsan", "Use LLVM/GCC compiler thread sanitizer (TSAN)", False),
+ BoolVariable("use_coverage", "Use instrumentation codes in the binary (e.g. for code coverage)", False),
]
@@ -142,6 +143,10 @@ def configure(env):
env.Append(CCFLAGS=["-fsanitize=thread"])
env.Append(LINKFLAGS=["-fsanitize=thread"])
+ if env["use_coverage"]:
+ env.Append(CCFLAGS=["-ftest-coverage", "-fprofile-arcs"])
+ env.Append(LINKFLAGS=["-ftest-coverage", "-fprofile-arcs"])
+
## Dependencies
if env["builtin_libtheora"]: