diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-03-24 07:36:57 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-03-24 07:36:57 +0000 |
commit | 205b02e97a1fa790b1410532ee1eadb86b43d81a (patch) | |
tree | 3faf4a372a4734fd37a0e8696d0af926eca8bfa7 | |
parent | 386031a06f06626d9d94927af754da6d44dcb5fb (diff) |
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
-rw-r--r-- | Makefile.rules | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile.rules b/Makefile.rules index a066a56fb8..0144d8dea2 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -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 |