Skip to content

Commit 3e73003

Browse files
committed
Move IAR linker flags into the DEFAULT_FLAGS dict
1 parent e3d9d54 commit 3e73003

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/toolchains/iar.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class IAR(mbedToolchain):
4242
'asm': [],
4343
'c': [],
4444
'cxx': ["--c++", "--no_rtti", "--no_exceptions", "--guard_calls"],
45-
'ld': [],
45+
'ld': ["--skip_dynamic_initialization", "--threaded_lib"],
4646
}
4747

4848
def __init__(self, target, options=None, notify=None, macros=None, silent=False, extra_verbose=False):
@@ -195,6 +195,10 @@ 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+
198202
@hook_tool
199203
def binary(self, resources, elf, bin):
200204
# Build binary command

0 commit comments

Comments
 (0)