Skip to content

Commit 8b6a7aa

Browse files
authored
Merge pull request #6229 from hug-dev/fix-elf-output-extension
Fix a bug using ELF as output extension
2 parents 5077644 + b0027c1 commit 8b6a7aa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/toolchains/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,8 +1130,10 @@ def link_program(self, r, tmp_path, name):
11301130
mkdir(new_path)
11311131

11321132
filename = name+'.'+ext
1133+
# Absolute path of the final linked file
1134+
full_path = join(tmp_path, filename)
11331135
elf = join(tmp_path, name + '.elf')
1134-
bin = None if ext is 'elf' else join(tmp_path, filename)
1136+
bin = None if ext == 'elf' else full_path
11351137
map = join(tmp_path, name + '.map')
11361138

11371139
r.objects = sorted(set(r.objects))
@@ -1155,7 +1157,7 @@ def link_program(self, r, tmp_path, name):
11551157
self.var("compile_succeded", True)
11561158
self.var("binary", filename)
11571159

1158-
return bin, needed_update
1160+
return full_path, needed_update
11591161

11601162
# THIS METHOD IS BEING OVERRIDDEN BY THE MBED ONLINE BUILD SYSTEM
11611163
# ANY CHANGE OF PARAMETERS OR RETURN VALUES WILL BREAK COMPATIBILITY

0 commit comments

Comments
 (0)