Allow dependency parsing to fail, gracefully continuing

pull/3229/head
Jimmy Brisson 2016-11-08 10:59:33 -06:00
parent 96e1d5bd73
commit c3915215e4
1 changed files with 4 additions and 1 deletions

View File

@ -887,7 +887,10 @@ class mbedToolchain:
if ext == '.c' or ext == '.cpp':
base, _ = splitext(object)
dep_path = base + '.d'
deps = self.parse_dependencies(dep_path) if (exists(dep_path)) else []
try:
deps = self.parse_dependencies(dep_path) if (exists(dep_path)) else []
except IOError, IndexError:
deps = []
if len(deps) == 0 or self.need_update(object, deps):
if ext == '.cpp' or self.COMPILE_C_AS_CPP:
return self.compile_cpp(source, object, includes)