From 3ad3a9f1d594a78f3852f4ee72cde3f448898621 Mon Sep 17 00:00:00 2001 From: Brian Daniels Date: Fri, 27 Jan 2017 12:07:13 +0200 Subject: [PATCH] Adding fatal error detection to toolchians. Before the toolchains would ignore error messages that contained the string "Fatal error". This would lead to a silent failure unless the compile command was ran with verbose options. This is now fixed. --- tools/toolchains/arm.py | 2 +- tools/toolchains/gcc.py | 2 +- tools/toolchains/iar.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/toolchains/arm.py b/tools/toolchains/arm.py index b365d0b0f9..ba95c9cb7f 100644 --- a/tools/toolchains/arm.py +++ b/tools/toolchains/arm.py @@ -26,7 +26,7 @@ class ARM(mbedToolchain): LIBRARY_EXT = '.ar' STD_LIB_NAME = "%s.ar" - DIAGNOSTIC_PATTERN = re.compile('"(?P[^"]+)", line (?P\d+)( \(column (?P\d+)\)|): (?PWarning|Error): (?P.+)') + DIAGNOSTIC_PATTERN = re.compile('"(?P[^"]+)", line (?P\d+)( \(column (?P\d+)\)|): (?PWarning|Error|Fatal error): (?P.+)') INDEX_PATTERN = re.compile('(?P\s*)\^') DEP_PATTERN = re.compile('\S+:\s(?P.+)\n') diff --git a/tools/toolchains/gcc.py b/tools/toolchains/gcc.py index f21ce54624..3186cbb76f 100644 --- a/tools/toolchains/gcc.py +++ b/tools/toolchains/gcc.py @@ -25,7 +25,7 @@ class GCC(mbedToolchain): LIBRARY_EXT = '.a' STD_LIB_NAME = "lib%s.a" - DIAGNOSTIC_PATTERN = re.compile('((?P[^:]+):(?P\d+):)(\d+:)? (?Pwarning|error): (?P.+)') + DIAGNOSTIC_PATTERN = re.compile('((?P[^:]+):(?P\d+):)(\d+:)? (?Pwarning|error|fatal error): (?P.+)') INDEX_PATTERN = re.compile('(?P\s*)\^') def __init__(self, target, notify=None, macros=None, diff --git a/tools/toolchains/iar.py b/tools/toolchains/iar.py index cf4db9ee5e..bbbd114e5f 100644 --- a/tools/toolchains/iar.py +++ b/tools/toolchains/iar.py @@ -26,7 +26,7 @@ class IAR(mbedToolchain): LINKER_EXT = '.icf' STD_LIB_NAME = "%s.a" - DIAGNOSTIC_PATTERN = re.compile('"(?P[^"]+)",(?P[\d]+)\s+(?PWarning|Error)(?P.+)') + DIAGNOSTIC_PATTERN = re.compile('"(?P[^"]+)",(?P[\d]+)\s+(?PWarning|Error|Fatal error)(?P.+)') INDEX_PATTERN = re.compile('(?P\s*)\^') @staticmethod