Skip to content

Commit 20f421c

Browse files
committed
Auto merge of #26822 - tamird:llvm-config, r=alexcrichton
Minor stuff.
2 parents 7b78538 + 1491a8f commit 20f421c

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

mk/main.mk

-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ LLVM_BINDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --bindir)
295295
LLVM_INCDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --includedir)
296296
LLVM_LIBDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libdir)
297297
LLVM_LIBDIR_RUSTFLAGS_$(1)=-L "$$(LLVM_LIBDIR_$(1))"
298-
LLVM_LIBS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libs $$(LLVM_COMPONENTS))
299298
LLVM_LDFLAGS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --ldflags)
300299
ifeq ($$(findstring freebsd,$(1)),freebsd)
301300
# On FreeBSD, it may search wrong headers (that are for pre-installed LLVM),

src/etc/mklldeps.py

+6-7
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@
1414

1515
f = open(sys.argv[1], 'wb')
1616

17-
components = sys.argv[2].split(' ')
18-
components = [i for i in components if i] # ignore extra whitespaces
17+
components = sys.argv[2].split() # splits on whitespace
1918
enable_static = sys.argv[3]
20-
llconfig = sys.argv[4]
19+
llvm_config = sys.argv[4]
2120

2221
f.write("""// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2322
// file at the top-level directory of this distribution and at
@@ -39,15 +38,15 @@ def run(args):
3938
out, err = proc.communicate()
4039

4140
if err:
42-
print("failed to run llconfig: args = `{}`".format(args))
41+
print("failed to run llvm_config: args = `{}`".format(args))
4342
print(err)
4443
sys.exit(1)
4544
return out
4645

4746
f.write("\n")
4847

4948
# LLVM libs
50-
args = [llconfig, '--libs', '--system-libs']
49+
args = [llvm_config, '--libs', '--system-libs']
5150

5251
args.extend(components)
5352
out = run(args)
@@ -69,13 +68,13 @@ def run(args):
6968
f.write(")]\n")
7069

7170
# LLVM ldflags
72-
out = run([llconfig, '--ldflags'])
71+
out = run([llvm_config, '--ldflags'])
7372
for lib in out.strip().split(' '):
7473
if lib[:2] == "-l":
7574
f.write("#[link(name = \"" + lib[2:] + "\")]\n")
7675

7776
# C++ runtime library
78-
out = run([llconfig, '--cxxflags'])
77+
out = run([llvm_config, '--cxxflags'])
7978
if enable_static == '1':
8079
assert('stdlib=libc++' not in out)
8180
f.write("#[link(name = \"stdc++\", kind = \"static\")]\n")

0 commit comments

Comments
 (0)