[llvm-commits] CVS: llvm/Makefile.rules

Reid Spencer reid at x10sys.com
Thu Mar 23 23:37:11 PST 2006



Changes in directory llvm:

Makefile.rules updated: 1.353 -> 1.354
---
Log message:

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.


---
Diffs of the changes:  (+8 -0)

 Makefile.rules |    8 ++++++++
 1 files changed, 8 insertions(+)


Index: llvm/Makefile.rules
diff -u llvm/Makefile.rules:1.353 llvm/Makefile.rules:1.354
--- llvm/Makefile.rules:1.353	Wed Mar 22 09:59:55 2006
+++ llvm/Makefile.rules	Fri Mar 24 01:36:57 2006
@@ -564,6 +564,14 @@
 # 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






More information about the llvm-commits mailing list