[LLVMdev] Build problems on MinGW solved - possible llvm-config bug
Óscar Fuentes
ofv at wanadoo.es
Sun Jan 18 05:20:40 PST 2009
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.
Would you like to file a bug report? This is the way of getting it
fixed.
> 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.
This one also deserves a bug report. My guess is that llvm-config is
throwing backslashes (\) which are escaped at some intermediate point
and finally translated to double slashes by MSYS.
> Thanks once again Óscar and Anton.
You're welcome.
--
Oscar
More information about the llvm-dev
mailing list