Skip to content

Commit

Permalink
llconfig is llvm-config
Browse files Browse the repository at this point in the history
  • Loading branch information
tamird committed Jul 6, 2015
1 parent 155c8f9 commit 158fcbb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/etc/mklldeps.py
Expand Up @@ -16,7 +16,7 @@

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
Expand All @@ -38,15 +38,15 @@ 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

f.write("\n")

# LLVM libs
args = [llconfig, '--libs', '--system-libs']
args = [llvm_config, '--libs', '--system-libs']

args.extend(components)
out = run(args)
Expand All @@ -68,13 +68,13 @@ def run(args):
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")
Expand Down

0 comments on commit 158fcbb

Please sign in to comment.