[LLVMdev] Static linking of execution engine

Mario Schwalbe
Wed, 22 May 2013 18:29:40 -0000

Am 22.05.13 19:32, schrieb Kaylor, Andrew:
> If you send me details about how you're building this I'll look
into it.

Thanks. I forgot to mention it's LLVM 3.2 on Ubuntu 12.10. The command line
is:

$ g++-4.7 ExecutionEngineTest.cpp $(llvm-config --cxxflags --ldflags --libs)
-lpthread -ldl
$ g++-4.7 -static ExecutionEngineTest.cpp $(llvm-config --cxxflags --ldflags
--libs) -lpthread -ldl

The -lpthread -ldl is there explicitly because llvm-config prints them
as part of --ldflags before the dependent LLVM libs.

The first of the above commands works well. The second one does not.

ciao,
Mario