Skip to content

Commit c391521

Browse files
committed
Allow dependency parsing to fail, gracefully continuing
1 parent 96e1d5b commit c391521

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/toolchains/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,10 @@ def compile_command(self, source, object, includes):
887887
if ext == '.c' or ext == '.cpp':
888888
base, _ = splitext(object)
889889
dep_path = base + '.d'
890-
deps = self.parse_dependencies(dep_path) if (exists(dep_path)) else []
890+
try:
891+
deps = self.parse_dependencies(dep_path) if (exists(dep_path)) else []
892+
except IOError, IndexError:
893+
deps = []
891894
if len(deps) == 0 or self.need_update(object, deps):
892895
if ext == '.cpp' or self.COMPILE_C_AS_CPP:
893896
return self.compile_cpp(source, object, includes)

0 commit comments

Comments
 (0)