[cfe-dev] Building LLVM and clang with different options
mats at planetcatfish.com
Fri May 29 12:24:10 PDT 2015
I do as Reid describes. I build a "release" build that I install into
/usr/local/... and then a debug build that I install into a different
directory. When I then build my own project (that uses LLVM), I use the
/usr/local version to perform the build, but use the debug build for the
libraries and headers, such that I get the debug info and asserts that help
me tell me what I've done wrong (inevitably I do several times for each new
feature I'm implementing).
On 29 May 2015 at 18:52, Reid Kleckner <rnk at google.com> wrote:
> In general, this is too difficult to be worth the trouble. You can attempt
> it by doing a standalone build, where you install LLVM to some local
> prefix, checkout clang separately outside of llvm, put LLVM's bin directory
> on PATH, and try to configure it that way.
> On Fri, May 29, 2015 at 10:21 AM, Vinay Sajip <vinay_sajip at yahoo.co.uk>
>> I'm trying to build LLVM with a build type of MinSizeRel and clang with a
>> build type of Debug. I've cloned llvm and clang (into llvm/tools/clang),
>> created a build directory parallel to llvm and from it, and invoked 'cmake
>> -G "Unix Makefiles" ../llvm'. I changed (in build/CMakeCache.txt)
>> CMAKE_BUILD_TYPE to MinSizeRel and ran make - both LLVM and clang are
>> successfully. I now want to build clang in Debug mode, but don't see any
>> obvious way of doing this - changing the CMAKE_BUILD_TYPE to Debug causes
>> LLVM to be rebuilt in Debug mode, too. Is there an easy way to do this via
>> CMake, or is some other approach required?
>> Vinay Sajip
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev