16
16
17
17
components = sys .argv [2 ].split () # splits on whitespace
18
18
enable_static = sys .argv [3 ]
19
- llconfig = sys .argv [4 ]
19
+ llvm_config = sys .argv [4 ]
20
20
21
21
f .write ("""// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
22
22
// file at the top-level directory of this distribution and at
@@ -38,15 +38,15 @@ def run(args):
38
38
out , err = proc .communicate ()
39
39
40
40
if err :
41
- print ("failed to run llconfig : args = `{}`" .format (args ))
41
+ print ("failed to run llvm_config : args = `{}`" .format (args ))
42
42
print (err )
43
43
sys .exit (1 )
44
44
return out
45
45
46
46
f .write ("\n " )
47
47
48
48
# LLVM libs
49
- args = [llconfig , '--libs' , '--system-libs' ]
49
+ args = [llvm_config , '--libs' , '--system-libs' ]
50
50
51
51
args .extend (components )
52
52
out = run (args )
@@ -68,13 +68,13 @@ def run(args):
68
68
f .write (")]\n " )
69
69
70
70
# LLVM ldflags
71
- out = run ([llconfig , '--ldflags' ])
71
+ out = run ([llvm_config , '--ldflags' ])
72
72
for lib in out .strip ().split (' ' ):
73
73
if lib [:2 ] == "-l" :
74
74
f .write ("#[link(name = \" " + lib [2 :] + "\" )]\n " )
75
75
76
76
# C++ runtime library
77
- out = run ([llconfig , '--cxxflags' ])
77
+ out = run ([llvm_config , '--cxxflags' ])
78
78
if enable_static == '1' :
79
79
assert ('stdlib=libc++' not in out )
80
80
f .write ("#[link(name = \" stdc++\" , kind = \" static\" )]\n " )
0 commit comments