]> git.lizzy.rs Git - rust.git/commitdiff
mklldeps.py: Ignore extra whitespaces of argument
authorklutzy <klutzytheklutzy@gmail.com>
Thu, 19 Dec 2013 15:50:36 +0000 (00:50 +0900)
committerklutzy <klutzytheklutzy@gmail.com>
Thu, 19 Dec 2013 16:53:41 +0000 (01:53 +0900)
src/etc/mklldeps.py

index 5b1abdf68a3d66f4d604a13694577f1aedb19293..3b2cef3c9e1cba5f76cb2423144992857742fd44 100644 (file)
@@ -7,6 +7,7 @@ import subprocess
 f = open(sys.argv[1], 'wb')
 
 components = sys.argv[2].split(' ')
+components = [i for i in components if i]  # ignore extra whitespaces
 
 f.write("""// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
@@ -51,6 +52,10 @@ for llconfig in sys.argv[3:]:
     proc = subprocess.Popen(args, stdout = subprocess.PIPE)
     out, err = proc.communicate()
 
+    if err:
+        print("failed to run llconfig: args = `{}`".format(args))
+        sys.exit(1)
+
     for lib in out.strip().split(' '):
         lib = lib[2:] # chop of the leading '-l'
         f.write("#[link(name = \"" + lib + "\", kind = \"static\")]\n")