From 155c8f9fa8d67badabd72bec16b9a9b3f49eb8a1 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Fri, 29 May 2015 12:36:02 -0400 Subject: [PATCH 1/3] Simplify --- src/etc/mklldeps.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/etc/mklldeps.py b/src/etc/mklldeps.py index 7a925fa3f3367..d0f91ba683f9e 100644 --- a/src/etc/mklldeps.py +++ b/src/etc/mklldeps.py @@ -14,8 +14,7 @@ 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] From 158fcbbdd6db45058530abda35ce59d267ee489e Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Fri, 29 May 2015 12:36:13 -0400 Subject: [PATCH 2/3] `llconfig` is `llvm-config` --- src/etc/mklldeps.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/etc/mklldeps.py b/src/etc/mklldeps.py index d0f91ba683f9e..1cc65406b2c00 100644 --- a/src/etc/mklldeps.py +++ b/src/etc/mklldeps.py @@ -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 @@ -38,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 @@ -46,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) @@ -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") From 1491a8fa01f174a05e16c874fe717b99d103567d Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Sat, 30 May 2015 09:35:34 -0400 Subject: [PATCH 3/3] Remove unused variable --- mk/main.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/mk/main.mk b/mk/main.mk index 39261191fb74f..964ae626d0c8d 100644 --- a/mk/main.mk +++ b/mk/main.mk @@ -295,7 +295,6 @@ LLVM_BINDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --bindir) LLVM_INCDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --includedir) LLVM_LIBDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libdir) LLVM_LIBDIR_RUSTFLAGS_$(1)=-L "$$(LLVM_LIBDIR_$(1))" -LLVM_LIBS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libs $$(LLVM_COMPONENTS)) LLVM_LDFLAGS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --ldflags) ifeq ($$(findstring freebsd,$(1)),freebsd) # On FreeBSD, it may search wrong headers (that are for pre-installed LLVM),