[llvm-dev] Building llvm so it can be installed by other users

Jonathan Roelofs via llvm-dev llvm-dev at lists.llvm.org
Tue Oct 20 13:37:11 PDT 2015

On 10/20/15 2:26 PM, David Lobron via llvm-dev wrote:
> Hey All,
> I'm working on packaging the current version of llvm for use by other
> people at my company.  As part of this, I'd like to make a tarball of
> my build,

Build directories aren't easily redistributable, nor are they really 
meant to be. Install directories on the other hand can be, provided you 
build with the right options, and package together all the dependencies.

Is there a particular reason why you want to distribute your build dir 
instead of your install dir?


> so that other users do not have to rebuild from source in
> order to use llvm for their builds.  Ideally, I'd like my makefile to
> un-tar my build output, and then do a "make install" to install
> anything that has been updated - we have a standard install root
> called "common" that lives one directory up from the build directory
> on our build machines.
> The tricky thing I'm running into is that all of the makefiles
> generated by cmake contain absolute paths, e.g.,
> "/home/dlobron/build/clangport/akamai/llvm/llvm-3.7/llvm/include/llvm"
>  I was wondering if it's possible to build llvm in such a way that
> all of these files contain relative paths.  It would be perfect for
> me if the above line, and all other generated makefile paths, would
> read like this:
> "../common/include/llvm"
> I tried setting -DCMAKE_INSTALL_PREFIX, but it picked up the full
> path- I wasn't sure how to tell it to keep the path relative.
> Thanks for any help you can give!
> --David
> _______________________________________________ LLVM Developers
> mailing list llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded

More information about the llvm-dev mailing list