rust: replace for loop with any()
This is a little cleaner, and short circuits correctly, unlike the loop it replaces
This commit is contained in:
parent
6544f151db
commit
0edd005804
|
@ -1630,10 +1630,7 @@ int dummy;
|
|||
if d == '':
|
||||
d = '.'
|
||||
args += ['-L', d]
|
||||
has_shared_deps = False
|
||||
for dep in target.get_dependencies():
|
||||
if isinstance(dep, build.SharedLibrary):
|
||||
has_shared_deps = True
|
||||
has_shared_deps = any(isinstance(dep, build.SharedLibrary) for dep in target.get_dependencies())
|
||||
if isinstance(target, build.SharedLibrary) or has_shared_deps:
|
||||
# add prefer-dynamic if any of the Rust libraries we link
|
||||
# against are dynamic, otherwise we'll end up with
|
||||
|
|
Loading…
Reference in New Issue