[LLVMdev] Rebuilding LLVM libraries with LLVM-GCC on Windows
Óscar Fuentes
ofv at wanadoo.es
Fri Dec 11 14:32:19 PST 2009
"Michael Ness" <mike at liquido2.com> writes:
[snip]
> I then used both of these builds to attempt to assemble and link my
> project with llvm-g++:
>
> $ llvm-g++ out.s -o out.exe `llvm-config --ldflags --libs x86 core
> system support`
>
> gave me the errors found in the attached file "errors_gcc.txt". And
>
> $ llvm-g++ out.s -o out.exe `~/llvm-2.6-gcc/bin/llvm-config --ldflags
> --libs x86 core system support`
>
> gave me the errors found in the attached file "errors_llvm-gcc.txt".
You are working with an assembler file. Why?
You don't need to enumerate the base libraries. Something like
llvm-config --ldflags --libs x86
should suffice. In the next message, please show the output of that
command. Maybe the `--ldflags' is adding stuff to the command line that
causes the problem. Try removing it.
> I found it interesting that the attempt to link with the LLVM libs
> built with gcc caused several "multiple definition" errors, whereas
> the attempt to link with the libs built by llvm-gcc cause no multiple
> definitions but many more stdcall-fixup warnings.
Was the assembler file generated by the same g++ you are using for
linking it and, previously, for building LLVM?
> Both attempts failed to link, citing llvm::Type::Int32Ty as unresolved
> among other things. Isn't llvm::Type in Core?
Yes.
> I appears I'm closer using the llvm-gcc build, but still unable to
> link everything correctly. Any other ideas?
As the LLVM tools builds file, I think that the problem is in how you
handle the build of your project. Or you are hitting a problem with
MinGW's binutils.
Have you access to other toolset for building your project (VC++, g++ on
Linux, etc.)? Have you tried using LLVM libraries created with
configure&make, as Anton suggested?
--
Óscar
More information about the llvm-dev
mailing list