Skip to content

Commit da818e9

Browse files
committed
mklldeps.py: Ignore extra whitespaces of argument
1 parent 2afa97a commit da818e9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/etc/mklldeps.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
f = open(sys.argv[1], 'wb')
88

99
components = sys.argv[2].split(' ')
10+
components = [i for i in components if i] # ignore extra whitespaces
1011

1112
f.write("""// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
1213
// file at the top-level directory of this distribution and at
@@ -51,6 +52,10 @@
5152
proc = subprocess.Popen(args, stdout = subprocess.PIPE)
5253
out, err = proc.communicate()
5354

55+
if err:
56+
print("failed to run llconfig: args = `{}`".format(args))
57+
sys.exit(1)
58+
5459
for lib in out.strip().split(' '):
5560
lib = lib[2:] # chop of the leading '-l'
5661
f.write("#[link(name = \"" + lib + "\", kind = \"static\")]\n")

0 commit comments

Comments
 (0)