octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using 'llvm-config --ldflags' ?


From: Michael Goffioul
Subject: Re: Using 'llvm-config --ldflags' ?
Date: Tue, 31 Jul 2012 19:43:07 +0100

On Tue, Jul 31, 2012 at 7:04 PM, Max Brister <address@hidden> wrote:
On Tue, Jul 31, 2012 at 12:47 PM, Michael Goffioul
<address@hidden> wrote:
> On Tue, Jul 31, 2012 at 6:40 PM, Max <address@hidden> wrote:
>>
>> On Tue, Jul 31, 2012 at 11:06 AM, Michael Goffioul
>> <address@hidden> wrote:
>> > Max,
>> >
>> > Is there a reason not to use 'llvm-config --ldflags' instead of
>> > '-L`llvm-config --libdir`'? It appears that using --ldflags also adds
>> > system
>> > libraries detected during the llvm configuration step, which may be
>> > required
>> > when linking liboctinterp.
>> >
>> > Michael.
>>
>> It looks to me like 'llvm-config --ldflags' contains all of the flags
>> which llvm was linked with. For me this includes -lffi and -ldl. These
>> libraries may be needed to build llvm, but the are not required when
>> linking with llvm. So I do not want to use 'llvm-config --ldflags'
>> because it includes libraries that we do not need to link to.
>
>
> They may be required when llvm is built statically. Building llvm as a
> dynamic library is supported under Windows (not sure about cygwin).
>
> Michael.
>

I think we have had a successful build on cygwin.

I get an undefined reference in llvm::sys::Path::GetUserHomeDirectory(), which uses SHGetFolderPath from shell32. Obviously, the cygwin implementation will use cygwin specific to compute the user home directory, implemented in cygwin DLL, which is pulled in automatically by GCC.
 
Do you know if there is a way to check to see if we are linking with
llvm statically?

No, and I don't think you should care when using utilities like llvm-config or even pkg-config.

Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]