Add a facility for invoking the llvm-config tool when linking a program.

This facility allows LLVMLIBS to be specified with something like:
LLVMLIBS = config --libs jit
instead of:
LLVMLIBS = JIT
with the same effect. However, the llvm-config utility is much more versatile
than the single keyword approach. Note that "config" is the keyword after
which any arguments to llvm-config are allowed. When llvm-config is tested
and working well, we'll start using this and drop support for the JIT
keyword.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27057 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2006-03-24 07:36:57 +00:00
parent 386031a06f
commit 205b02e97a

View File

@ -564,6 +564,14 @@ endif
# shorthand for a bunch of libraries that get the correct
# JIT support for a library or a tool that runs JIT.
#---------------------------------------------------------
ifeq ($(firstword $(LLVMLIBS)),config)
LLVM_CONFIG := $(LLVM_SRC_ROOT)/utils/llvm-config/llvm-config
LLVMLIBS := $(shell $(LLVM_CONFIG) $(wordlist 2,9999,$(LLVMLIBS)))
LLVMLIBS := $(patsubst $(PROJ_libdir)/%,%,$(LLVMLIBS))
LLVMLIBS := $(patsubst %.o,%,$(LLVMLIBS))
LLVMLIBS := $(patsubst -l%,%.a,$(LLVMLIBS))
endif
ifeq ($(LLVMLIBS),JIT)
# Make sure we can get our own symbols in the tool