[LLVMdev] Build problems on MinGW solved - possible llvm-config bug
Duncan Pierce
duncan at duncanpierce.org
Sun Jan 18 04:58:15 PST 2009
Óscar Fuentes <ofv <at> wanadoo.es> writes:
> Duncan Pierce <duncan <at> duncanpierce.org> writes:
>
> > I have /lib/libimagehlp.a and /lib/libpsapi.a
> > And llvm-config seems to be asking for them to be picked up:
> >
> > -I//include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -O2
> > -fomit-frame-pointer -Woverloaded-virtual
> > -L//lib -lpsapi -limagehlp -lm
> > -lLLVMCore -lLLVMSupport -lLLVMSystem
> >
> > So I'm still mystified.
>
> Put them at the end of the library list:
>
> -lLLVMCore -lLLVMSupport -lLLVMSystem -limagehlp -lpsapi -lm
This works. I had a look at changing the llvm-config.in.in but my Perl hacking
skills aren't up to getting --libnames and --libfiles to work as well as --libs.
I discovered one other thing that was causing me problems on MinGW: if I use the
msys.bat to open a terminal llvm-config inserts double slashes at the start of
any absolute path it generates (e.g. //lib/LLVMX86CodeGen.o) - this breaks g++.
If I do the same thing from a DOS prompt running bash, slashes don't get doubled
and everything works fine.
Thanks once again Óscar and Anton.
Duncan Pierce
More information about the llvm-dev
mailing list