Skip to content

Commit 441fda9

Browse files
committed
tools: fix toolchain extend inc paths
inc paths might be a list or might not be (just single string). If they don't, we are ending up with non valid include paths (one letter include paths). This as result would not compile.
1 parent aae62bd commit 441fda9

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
@@ -863,7 +863,10 @@ def compile_sources(self, resources, inc_dirs=None):
863863

864864
inc_paths = resources.inc_dirs
865865
if inc_dirs is not None:
866-
inc_paths.extend(inc_dirs)
866+
if isinstance(inc_dirs, list):
867+
inc_paths.extend(inc_dirs)
868+
else:
869+
inc_paths.append(inc_dirs)
867870
# De-duplicate include paths
868871
inc_paths = set(inc_paths)
869872
# Sort include paths for consistency

0 commit comments

Comments
 (0)