[LLVMbugs] [PATCH] Remove useless workaround from llvm-config

Eric Kidd emk.lists at gmail.com
Fri Mar 24 08:18:15 PST 2006

On Mar 24, 2006, at 10:23 AM, Reid Spencer wrote:
> I'm in no hurry :)

It doesn't look like I'll be free before Monday. :-( In the meantime,  
here's a few more possibilities.

>>    2) If you're missing components, try "llvm-config --components" to
>> get a list. The old "JIT" magic corresponds to "--libnames engine
>> bcreader scalaropts" in the new system.
> That still doesn't work. I get:
> llvm[0]: Linking Debug executable Fibonacci
> /proj/llvm/llvm2/examples/Fibonacci/Debug/fibonacci.o: In function  
> `ForceInterpreterLinking':
> /proj/llvm/llvm2/include/llvm/ExecutionEngine/Interpreter.h:35:  
> undefined reference to `llvm::LinkInInterpreter()'

You need to add 'interpreter', at a minimum. 'engine' will only get  
you either the JIT or the interpreter--whichever is best for the  
current platform--but never both.

> /proj/llvm/llvm2/Debug/lib/libLLVMTransformUtils.a(LoopSimplify.o):  
> In function `__static_initialization_and_destruction_0':
> /proj/llvm/llvm2/include/llvm/Analysis/AliasAnalysis.h:325:  
> undefined reference to `llvm::BasicAAStub()'

You might be having problems with the circular dependencies again. :-(

Anyway, the example in llvm-config.pod works against a tree from  
yesterday afternoon:

$ g++ `llvm-config --cxxflags` -o HowToUseJIT.o -c HowToUseJIT.cpp
$ g++ `llvm-config --ldflags` -o HowToUseJIT HowToUseJIT.o `llvm- 
config --libs engine bcreader scalaropts`

Can you run this example by hand? Do your new Makefile rules work  
with HowToUseJIT.cpp if you replace --libs with --libnames in the  
above example?

>>    3) You'll need to conditionalize anything that uses llvm-config
>> using "ifeq ($(HAVE_PERL),1)" unless you're prepared to add Perl as
>> an official dependency (which might not go down well with the GCC
>> folks).
> Yes, that's an issue we'll have to ponder once this is working. The
> answer will likely be "no" which means we might need to make llvm- 
> config
> a C/C++ program.

Yeah, I've been leaning that way, too. Do we need to do this before  
1.7, or can it wait?


More information about the llvm-bugs mailing list