From 10534019b9150f44ea5603c6c3a0fb095137ab36 Mon Sep 17 00:00:00 2001 From: Brian Daniels Date: Wed, 28 Sep 2016 14:42:35 -0500 Subject: [PATCH] Making all toolchains print final compiler message. This functionality was already present in the ARM toolchain script, but this commit adds this across all toolchain scripts. Solves an issue that cropped up where a build error wasn't being printed unless the verbose flag was used. This should now print any existing error messages that have been printed when the compiler output is being parsed. --- tools/toolchains/arm.py | 1 + tools/toolchains/gcc.py | 4 ++++ tools/toolchains/iar.py | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/tools/toolchains/arm.py b/tools/toolchains/arm.py index f294edb5f5..c3f85a302c 100644 --- a/tools/toolchains/arm.py +++ b/tools/toolchains/arm.py @@ -106,6 +106,7 @@ class ARM(mbedToolchain): if match is not None: if msg is not None: self.cc_info(msg) + msg = None msg = { 'severity': match.group('severity').lower(), 'file': match.group('file'), diff --git a/tools/toolchains/gcc.py b/tools/toolchains/gcc.py index dbbe2c62bc..b4b98ef056 100644 --- a/tools/toolchains/gcc.py +++ b/tools/toolchains/gcc.py @@ -146,6 +146,7 @@ class GCC(mbedToolchain): if match is not None: if msg is not None: self.cc_info(msg) + msg = None msg = { 'severity': match.group('severity').lower(), 'file': match.group('file'), @@ -166,6 +167,9 @@ class GCC(mbedToolchain): else: msg['text'] += line+"\n" + if msg is not None: + self.cc_info(msg) + def get_dep_option(self, object): base, _ = splitext(object) dep_path = base + '.d' diff --git a/tools/toolchains/iar.py b/tools/toolchains/iar.py index b712c2a158..b454e6e177 100644 --- a/tools/toolchains/iar.py +++ b/tools/toolchains/iar.py @@ -123,6 +123,7 @@ class IAR(mbedToolchain): if match is not None: if msg is not None: self.cc_info(msg) + msg = None msg = { 'severity': match.group('severity').lower(), 'file': match.group('file'), @@ -143,6 +144,9 @@ class IAR(mbedToolchain): else: msg['text'] += line+"\n" + if msg is not None: + self.cc_info(msg) + def get_dep_option(self, object): base, _ = splitext(object) dep_path = base + '.d'