Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mk/llvm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ endif
LLVM_LINKAGE_PATH_$(1):=$$(abspath $$(RT_OUTPUT_DIR_$(1))/llvmdeps.rs)
$$(LLVM_LINKAGE_PATH_$(1)): $(S)src/etc/mklldeps.py $$(LLVM_CONFIG_$(1))
$(Q)$(CFG_PYTHON) "$$<" "$$@" "$$(LLVM_COMPONENTS)" "$$(CFG_ENABLE_LLVM_STATIC_STDCPP)" \
$$(LLVM_CONFIG_$(1))
"$$(CFG_LLVM_ROOT)" $$(LLVM_CONFIG_$(1))
endef

$(foreach host,$(CFG_HOST), \
Expand Down
5 changes: 3 additions & 2 deletions src/etc/mklldeps.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

components = sys.argv[2].split() # splits on whitespace
enable_static = sys.argv[3]
llvm_config = sys.argv[4]
llvm_root = sys.argv[4]
llvm_config = sys.argv[5]

f.write("""// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
Expand Down Expand Up @@ -63,7 +64,7 @@ def run(args):
lib = lib.strip()[1:]
f.write("#[link(name = \"" + lib + "\"")
# LLVM libraries are all static libraries
if 'LLVM' in lib:
if llvm_root == '' and 'LLVM' in lib:
f.write(", kind = \"static\"")
f.write(")]\n")

Expand Down