[LLVMdev] Compile dll on Mingw

yuan zheng tsinghuayuan86 at gmail.com
Wed Sep 1 23:06:17 PDT 2010


Hi,  NAKAMURA Takumi

Thank you, and thanks for your answer.

1.First of all, I test it on Linux . As you said, I have attempted to do,
 "/path/to/configure --enable-shared=yes" on ubuntu9.10.
After compiling, it generates lots of static libraries(.a) and only three
shared library(.so) , libLTO.so,  LLVMHello.so,  profile_rt.so. Is there
anyone which is the "BIG" one as you said?

2.And I find it seems that the option of "--enable-shared=yes" is defult
option. Command: $ ./configure --help ,  it will display this message:
--------------------------------------------------------------------------------------------------
Optional Features:
....
--enable-shared[=PKGS]  build shared libraries
                                      [default=yes]
....
--------------------------------------------------------------------------------------------------
I don't know if I consider is right?

3.By the way, my work environment:
OS : Ubuntu9.10
VirtualBox virtual machion
Virtual OS:  Windows XP
Compile environment:   MinGW and MSYS.
Our need is that: Compile a dynamic module with LLVM on MinGW,
                         So, we need dynamic library of LLVM, that is ".dll"
files.
If you compile LLVM on MinGW ever before? If there is some process
about it ?  Thanks.

4.On MinGW, we configure with "--enable-shared=yes" and compile,
but there is no ".dll" file generate. These are some advice on other
websites.
For instance,  using the tool of "cmake", when configure, add the macro
-DBUILD_SHARED_LIBS=ON.  With this method, it generates some
".dll.a" files --- libLLVMCore.dll.a  libLLVMSupport.dll.a
libLLVMSystem.dll.a.
Meanwhile, it would also appear lot's of errors.
What library types of "dll.a" file? Static or dynamic?  If this method
feasible?

Sorry for those plenty of questions, expect your answer, thanks.


Thanks,
yuanzheng.

2010/9/2 NAKAMURA Takumi <geek4civic at gmail.com>

> Hello, Yuan
>
> > I'm a newbie about llvm. Now, our project need the dynamic link
> library(dll)
> > about all of llvm library, such as libLLVMCore.dll, libLLVMSupport.dll,
> and
> > so on. How should I do?
>
> You may do, "/path/to/configure --enable-shared=yes",
> to build LLVM-2.8svn.dll.
> On your project, you have to specify to linker,
> "-L/path/to/dll -lLLVM-2.8svn"
> (maybe with -Wl,--enable-auto-import)
>
> We provide not individual DLLs but a "BIG" one.
> We don't provide import libraries.
>
> I think "DLL" feature is still experimental, and I need more feedback.
> When you met any troubles with DLL, ask here or file bugs!
>
> Have fun!
>
>
> ...Takumi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100902/9f89c1ae/attachment.html>


More information about the llvm-dev mailing list