Skip to content

Commit ff0230f

Browse files
authored
Merge pull request travitch#49 from domainexpert/profile-arcs
Added handling for code coverage instrumentation options
2 parents b61dd0f + fd307bd commit ff0230f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

driver/utils.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ def __init__(self, inputList, exactMatches={}, patternMatches={}):
201201
'-print-multi-lib' : (0, ArgumentListFilter.compileUnaryCallback),
202202
'-print-libgcc-file-name' : (0, ArgumentListFilter.compileUnaryCallback),
203203

204+
# Code coverage instrumentation
205+
'-fprofile-arcs' : (0, ArgumentListFilter.compileLinkUnaryCallback),
206+
'-coverage' : (0, ArgumentListFilter.compileLinkUnaryCallback),
204207

205208
#
206209
# BD: need to warn the darwin user that these flags will rain on their parade
@@ -377,6 +380,10 @@ def linkBinaryCallback(self, flag, arg):
377380
self.linkArgs.append(flag)
378381
self.linkArgs.append(arg)
379382

383+
def compileLinkUnaryCallback(self, flag):
384+
self.compileArgs.append(flag)
385+
self.linkArgs.append(flag)
386+
380387
def getOutputFilename(self):
381388
if self.outputFilename is not None:
382389
return self.outputFilename

0 commit comments

Comments
 (0)