Skip to content

Commit

Permalink
Merge pull request #54364 from skimmedsquare/osx-coverage
Browse files Browse the repository at this point in the history
Adds support for 'use_coverage' flag in OSX.
  • Loading branch information
akien-mga authored Oct 29, 2021
2 parents d3547be + 753836c commit 9307808
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions platform/osx/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
]


Expand Down Expand Up @@ -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"]:
Expand Down

0 comments on commit 9307808

Please sign in to comment.