[llvm-dev] Building llvm so it can be installed by other users
David Lobron via llvm-dev
llvm-dev at lists.llvm.org
Wed Oct 21 06:45:16 PDT 2015
> 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?
Oops, you are right: I think it's the install directory that I want to be rooted in a relative directory path. My goal here is for other users to be able to install and use clang and the required headers and libraries, without having to build from scratch. The install path for a given user would be, e.g.,
So for example, clang would be installed to /home/USERNAME/build/common/bin.
When I did my initial build, I set -DCMAKE_INSTALL_PREFIX to the "common" path above, but the Makefiles and cmake_makefiles that were generated have a full path (/home/dlobron/build/common), which of course is not portable to other users if they were to do a "make install". Is it possible to set DCMAKE_INSTALL_PREFIX (or another variable) such that I could package my install directory and another user could use it to install to their /home/OTHER-USERNAME/build/common root? Can I get it to write a relative path in the generated makefiles? I checked CMake.html in docs, but I did not see mention of this.
Please also let me know if I appear to be thinking about this the wrong way- I've never attempted to package up a compiler collection for others' use before and I might be missing something obvious.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2863 bytes
Desc: not available
More information about the llvm-dev