Skip to content

Commit 88054fa

Browse files
committed
IAR - add ld flags to link hook
1 parent dde970d commit 88054fa

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

tools/toolchains/iar.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def compile_cpp(self, source, object, includes):
158158
def link(self, output, objects, libraries, lib_dirs, mem_map):
159159
# Build linker command
160160
map_file = splitext(output)[0] + ".map"
161-
cmd = [self.ld, "-o", output, "--skip_dynamic_initialization", "--map=%s" % map_file] + objects + libraries
161+
cmd = [self.ld, "-o", output, "--map=%s" % map_file] + objects + libraries + self.flags['ld']
162162

163163
if mem_map:
164164
cmd.extend(["--config", mem_map])
@@ -195,10 +195,6 @@ def archive(self, objects, lib_path):
195195

196196
self.default_cmd([self.ar, lib_path, '-f', archive_files])
197197

198-
def link(self, output, objects, libraries, lib_dirs, mem_map):
199-
args = [self.ld, "-o", output, "--config", mem_map] + self.flags['ld']
200-
self.default_cmd(self.hook.get_cmdline_linker(args + objects + libraries))
201-
202198
@hook_tool
203199
def binary(self, resources, elf, bin):
204200
# Build binary command

0 commit comments

Comments
 (0)