Russell Wallace via llvm-dev
2016-Mar-23 17:45 UTC
[llvm-dev] Building a program with LLVM on Unix
When you say 'configuring and installing an appropriate version of LLVM and its libraries yourself' - that is indeed what I did on my own machine (Ubuntu 14.04 apt-get thinks 3.4 is latest, so I'm currently building 3.8 from source) - but how would you recommend doing this on a user's machine? On Wed, Mar 23, 2016 at 5:17 PM, David Jones <djones at xtreme-eda.com> wrote:> Given that the LLVM API changes constantly, any reasonable C++ program may > very well compile properly against only one specific version/release of > LLVM. The probability that you can properly build against whatever some > user has installed on some arbitrary system approaches zero. > > If you accept this, then you likely work around it by configuring and > installing an appropriate version of LLVM and its libraries yourself. At > that point, you may just as well hard-code the path to what you've > installed into your build system. Perhaps hard-code only the path to > llvm-config, and bootstrap the rest from that. > > > On Wed, Mar 23, 2016 at 12:48 PM, Russell Wallace via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Building LLVM itself involves Cmake, but what's the best way to build a >> C++ program that needs to link with the LLVM libraries? >> >> If you're trying to optimise for making life as easy as possible for >> users and people creating binary packages, in the normal course of events, >> autotools is recommended. But the tutorial mentions running llvm-config to >> get things like library paths - does autotools know how to do this? >> >> (I mostly use Windows, not as familiar with Unix, so please let me know >> if the question I'm asking is not quite the same as the question I should >> be asking.) >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160323/91098f84/attachment.html>
David Chisnall via llvm-dev
2016-Mar-23 17:55 UTC
[llvm-dev] Building a program with LLVM on Unix
On 23 Mar 2016, at 17:45, Russell Wallace via llvm-dev <llvm-dev at lists.llvm.org> wrote:> > When you say 'configuring and installing an appropriate version of LLVM and its libraries yourself' - that is indeed what I did on my own machine (Ubuntu 14.04 apt-get thinks 3.4 is latest, so I'm currently building 3.8 from source) - but how would you recommend doing this on a user's machine?If you’re shipping binaries, statically link. If you’re not, then it’s the packager’s problem. In the FreeBSD ports collection, we have every LLVM release from 3.5 onward as a dependency of something. They can all coexist happily. If LLVM were a bit better at stable APIs then we wouldn’t have, for example, Mesa only upgrading every few releases and requiring users to have at least two LLVM versions installed. David
Russell Wallace via llvm-dev
2016-Mar-23 18:06 UTC
[llvm-dev] Building a program with LLVM on Unix
On Wed, Mar 23, 2016 at 5:55 PM, David Chisnall <David.Chisnall at cl.cam.ac.uk> wrote:> If you’re shipping binaries, statically link.That's a good question - should I ship binaries? I've picked up the idea that if you want a Linux program of a version that isn't included in your distro packages, you build from source, but it seems here that including a binary in the tarball would do no harm, and perhaps save users some trouble? It seems to make sense but be something not usually done, so I figure I'd better check. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160323/05ee3ecb/attachment.html>