Skip to content

Commit b9b4bb5

Browse files
committed
Move IAR flag passing to constructor
1 parent ef6de7e commit b9b4bb5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/toolchains/iar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def __init__(self, target, notify=None, macros=None,
8484
self.cc += self.flags["common"] + c_flags_cmd + self.flags["c"]
8585
self.cppc += self.flags["common"] + c_flags_cmd + cxx_flags_cmd + self.flags["cxx"]
8686

87-
self.ld = [join(IAR_BIN, "ilinkarm")]
87+
self.ld = [join(IAR_BIN, "ilinkarm")] + self.flags['ld']
8888
self.ar = join(IAR_BIN, "iarchive")
8989
self.elf2bin = join(IAR_BIN, "ielftool")
9090

@@ -186,7 +186,7 @@ def compile_cpp(self, source, object, includes):
186186
def link(self, output, objects, libraries, lib_dirs, mem_map):
187187
# Build linker command
188188
map_file = splitext(output)[0] + ".map"
189-
cmd = self.ld + [ "-o", output, "--map=%s" % map_file] + objects + libraries + self.flags['ld']
189+
cmd = self.ld + [ "-o", output, "--map=%s" % map_file] + objects + libraries
190190

191191
if mem_map:
192192
cmd.extend(["--config", mem_map])

0 commit comments

Comments
 (0)