don't create unneeded internal dependency objects
when flattening the chained dependencies of an object, we don't need to
create any new internal dependencies if all the fields to be added to it
are empty.
For projects with a lot of libraries and dependency objects this can lead
to noticeable performance improvements.
fixup
@@ -855,6 +855,7 @@ This will become a hard error in a future Meson release.''')
self.link(l)
for l in dep.whole_libraries:
self.link_whole(l)
+ if dep.compile_args or dep.link_args:
# Those parts that are external.
extpart = dependencies.InternalDependency('undefined',
[],
