@@ -60,7 +60,6 @@ def main():
60
60
if cargs .version :
61
61
print "afl-cov-" + __version__
62
62
return exit_success
63
-
64
63
if cargs .gcov_check or cargs .gcov_check_bin :
65
64
if is_gcov_enabled (cargs ):
66
65
return exit_success
@@ -575,6 +574,8 @@ def lcov_gen_coverage(cov_paths, cargs):
575
574
lcov_opts += ' --rc lcov_branch_coverage=1'
576
575
if cargs .follow :
577
576
lcov_opts += ' --follow'
577
+ if cargs .clang :
578
+ lcov_opts += ' --gcov-tool afl-cov--wrapper '
578
579
579
580
run_cmd (cargs .lcov_path \
580
581
+ lcov_opts
@@ -800,6 +801,8 @@ def init_tracking(cov_paths, cargs):
800
801
lcov_opts = ''
801
802
if cargs .enable_branch_coverage :
802
803
lcov_opts += ' --rc lcov_branch_coverage=1 '
804
+ if cargs .clang :
805
+ lcov_opts += ' --gcov-tool afl-cov--wrapper '
803
806
804
807
### reset code coverage counters - this is done only once as
805
808
### afl-cov is spinning up even if AFL is running in parallel mode
@@ -1204,6 +1207,8 @@ def parse_cmdline():
1204
1207
help = "Print version and exit" , default = False )
1205
1208
p .add_argument ("-q" , "--quiet" , action = 'store_true' ,
1206
1209
help = "Quiet mode" , default = False )
1210
+ p .add_argument ("--clang" , action = 'store_true' ,
1211
+ help = "Support clang-based (afl-clang-fast) instrumentation" , default = False )
1207
1212
1208
1213
return p .parse_args ()
1209
1214
0 commit comments