@@ -29,8 +29,7 @@ class GCC(mbedToolchain):
29
29
DIAGNOSTIC_PATTERN = re .compile ('((?P<file>[^:]+):(?P<line>\d+):)(\d+:)? (?P<severity>warning|error): (?P<message>.+)' )
30
30
INDEX_PATTERN = re .compile ('(?P<col>\s*)\^' )
31
31
32
- COVERAGE_COMPILE_FLAGS = ["-fprofile-arcs" , "-ftest-coverage" , "-fprofile-dir=." ]
33
- COVERAGE_LINK_FLAGS = ["-fprofile-arcs" , "-ftest-coverage" , "-fprofile-dir=." ]
32
+ COVERAGE_FLAGS = ["-fprofile-arcs" , "-ftest-coverage" ]
34
33
COVERAGE_MACRO = 'MBED_CFG_DEBUG_OPTIONS_COVERAGE'
35
34
36
35
def __init__ (self , target , notify = None , macros = None ,
@@ -191,7 +190,7 @@ def get_compile_options(self, defines, includes, for_asm=False):
191
190
def assemble (self , source , object , includes ):
192
191
# Build assemble command
193
192
if self .check_if_coverage_enabled (source ):
194
- cmd = self .asm + self .COVERAGE_COMPILE_FLAGS + self .get_compile_options (self .get_symbols (True ), includes ) + ["-o" , object , source ]
193
+ cmd = self .asm + self .COVERAGE_FLAGS + self .get_compile_options (self .get_symbols (True ), includes ) + ["-o" , object , source ]
195
194
else :
196
195
cmd = self .asm + self .get_compile_options (self .get_symbols (True ), includes ) + ["-o" , object , source ]
197
196
@@ -205,7 +204,7 @@ def assemble(self, source, object, includes):
205
204
def compile (self , cc , source , object , includes ):
206
205
# Build compile command
207
206
if self .check_if_coverage_enabled (source ):
208
- cmd = cc + self .COVERAGE_COMPILE_FLAGS + self .get_compile_options (self .get_symbols (), includes )
207
+ cmd = cc + self .COVERAGE_FLAGS + self .get_compile_options (self .get_symbols (), includes )
209
208
else :
210
209
cmd = cc + self .get_compile_options (self .get_symbols (), includes )
211
210
@@ -236,7 +235,7 @@ def link(self, output, objects, libraries, lib_dirs, mem_map):
236
235
map_file = splitext (output )[0 ] + ".map"
237
236
238
237
if self .coverage_filter :
239
- cmd = self .ld + self .COVERAGE_LINK_FLAGS + ["-o" , output , "-Wl,-Map=%s" % map_file ] + objects + ["-Wl,--start-group" ] + libs + ["-Wl,--end-group" ]
238
+ cmd = self .ld + self .COVERAGE_FLAGS + ["-o" , output , "-Wl,-Map=%s" % map_file ] + objects + ["-Wl,--start-group" ] + libs + ["-Wl,--end-group" ]
240
239
else :
241
240
cmd = self .ld + ["-o" , output , "-Wl,-Map=%s" % map_file ] + objects + ["-Wl,--start-group" ] + libs + ["-Wl,--end-group" ]
242
241
if mem_map :
0 commit comments