Skip to content

Commit 0bbfc61

Browse files
committed
build: fix notifier typo and passing to builds API
Notifier should be passed to build libs functions, otherwise it's none and fails. Missing notify object in toolchain also fixed.
1 parent 8be2e34 commit 0bbfc61

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

tools/build.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
skipped.append(tt_id)
185185
else:
186186
try:
187-
notify = TerminalNotifer(options.verbose, options.silent)
187+
notifier = TerminalNotifier(options.verbose, options.silent)
188188
mcu = TARGET_MAP[target]
189189
profile = extract_profile(parser, options, toolchain)
190190
if options.source_dir:
@@ -197,6 +197,7 @@
197197
name=options.artifact_name,
198198
build_profile=profile,
199199
ignore=options.ignore,
200+
notify = notifier,
200201
)
201202
else:
202203
lib_build_res = build_mbed_libs(
@@ -206,6 +207,7 @@
206207
macros=options.macros,
207208
build_profile=profile,
208209
ignore=options.ignore,
210+
notify=notifier,
209211
)
210212

211213
for lib_id in libraries:

tools/toolchains/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ def _add_file(self, file_path, resources, base_path, exclude_paths=None):
733733

734734
elif ext == self.LINKER_EXT:
735735
if resources.linker_script is not None:
736-
self.info("Warning: Multiple linker scripts detected: %s -> %s" % (resources.linker_script, file_path))
736+
self.notify.info("Warning: Multiple linker scripts detected: %s -> %s" % (resources.linker_script, file_path))
737737
resources.linker_script = file_path
738738

739739
elif ext == '.lib':
@@ -1085,7 +1085,7 @@ def build_library(self, objects, dir, name):
10851085
lib = self.STD_LIB_NAME % name
10861086
fout = join(dir, lib)
10871087
if self.need_update(fout, objects):
1088-
self.info("Library: %s" % lib)
1088+
self.notify.info("Library: %s" % lib)
10891089
self.archive(objects, fout)
10901090
needed_update = True
10911091

@@ -1175,7 +1175,7 @@ def mem_stats(self, map):
11751175

11761176
# Parse and decode a map file
11771177
if memap.parse(abspath(map), toolchain) is False:
1178-
self.info("Unknown toolchain for memory statistics %s" % toolchain)
1178+
self.notify.info("Unknown toolchain for memory statistics %s" % toolchain)
11791179
return None
11801180

11811181
# Store the memap instance for later use

0 commit comments

Comments
 (0)