about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-07-06 16:22:47 +0000
committerbors <bors@rust-lang.org>2015-07-06 16:22:47 +0000
commit20f421cd522e35021049d6ec31f6b6ea3fc68c06 (patch)
treebe8e35fece79c3e67555d0a982ed0d8c3bbdf269 /src
parent7b7853897ba1469d7bb47fb6e4b877b6741fbb4b (diff)
parent1491a8fa01f174a05e16c874fe717b99d103567d (diff)
downloadrust-20f421cd522e35021049d6ec31f6b6ea3fc68c06.tar.gz
rust-20f421cd522e35021049d6ec31f6b6ea3fc68c06.zip
Auto merge of #26822 - tamird:llvm-config, r=alexcrichton
Minor stuff.
Diffstat (limited to 'src')
-rw-r--r--src/etc/mklldeps.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/etc/mklldeps.py b/src/etc/mklldeps.py
index 7a925fa3f33..1cc65406b2c 100644
--- a/src/etc/mklldeps.py
+++ b/src/etc/mklldeps.py
@@ -14,10 +14,9 @@ import subprocess
 
 f = open(sys.argv[1], 'wb')
 
-components = sys.argv[2].split(' ')
-components = [i for i in components if i]  # ignore extra whitespaces
+components = sys.argv[2].split() # splits on whitespace
 enable_static = sys.argv[3]
-llconfig = sys.argv[4]
+llvm_config = sys.argv[4]
 
 f.write("""// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
@@ -39,7 +38,7 @@ def run(args):
     out, err = proc.communicate()
 
     if err:
-        print("failed to run llconfig: args = `{}`".format(args))
+        print("failed to run llvm_config: args = `{}`".format(args))
         print(err)
         sys.exit(1)
     return out
@@ -47,7 +46,7 @@ def run(args):
 f.write("\n")
 
 # LLVM libs
-args = [llconfig, '--libs', '--system-libs']
+args = [llvm_config, '--libs', '--system-libs']
 
 args.extend(components)
 out = run(args)
@@ -69,13 +68,13 @@ for lib in out.strip().replace("\n", ' ').split(' '):
     f.write(")]\n")
 
 # LLVM ldflags
-out = run([llconfig, '--ldflags'])
+out = run([llvm_config, '--ldflags'])
 for lib in out.strip().split(' '):
     if lib[:2] == "-l":
         f.write("#[link(name = \"" + lib[2:] + "\")]\n")
 
 # C++ runtime library
-out = run([llconfig, '--cxxflags'])
+out = run([llvm_config, '--cxxflags'])
 if enable_static == '1':
     assert('stdlib=libc++' not in out)
     f.write("#[link(name = \"stdc++\", kind = \"static\")]\n")