[llvm-dev] LLVM as a project dependency

Paweł Bylica via llvm-dev llvm-dev at lists.llvm.org
Wed Jun 15 03:22:17 PDT 2016

Hello LLVM,

I'm maintaining a project that has the LLVM as a dependency. I tried using
pre-built LLVM libraries as much as possible, but have issues with this
approach all the time. I would like to discuss alternatives.

On Linux I try to use llvm-dev packages. Main issues are: different
distributions has LLVM packaged differently, the packages are sometimes
broken (usually cmake shared files), if not broken at the moment they can
brake in the future despite the fact the particular LLVM version has been
released long time ago, llvm.org/apt has been closed.

On macOS I use homebrew. Usually fine but you have to wait long time for a
new version (e.g. they rejected LLVM 3.7.0 for some reason). If I'm not
wrong, homebrew builds LLVM from source.

On Windows... I build it myself and upload binaries to GitHub. Then cmake
script can download it.

I really started thinking about building LLVM from source everywhere as a
my project build step. It should work more/less the same on all platforms.
In the future I might reach for LTO+PGO (I imagine it is not possible using
pre-built libraries).

Ideally would be to setup the dependencies against the LLVM libraries
during cmake configuration step and build only required libraries when
building my project.

Recently, I've seen cmake's ExternalProject module (
https://cmake.org/cmake/help/v3.5/module/ExternalProject.html) mentioned
here. Can this help with my goal?

Have you tried something similar? What your opinions? Any suggestions?

- Paweł
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160615/86916f95/attachment.html>

More information about the llvm-dev mailing list