[PATCH] D32595: CMakeLists: Don't set LLVM_MAIN_SRC_DIR when building stand-alone clang

Tom Stellard via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 31 12:52:14 PDT 2017


tstellar added a comment.

In https://reviews.llvm.org/D32595#769044, @beanz wrote:

> Is this really something we should be supporting? Building and testing clang with potentially out-of-sync lit or gtest seems undesirable to me.


This is actually what this patch is trying to avoid.   For example prior to this patch, if you build and install llvm trunk to /usr/local, and then checkout an older stable branch in your llvm tree,  when you try and build clang from trunk using the llvm install from /usr/local, it will pull lit and gtest from the LLVM source tree which is now  much older than the checkout of clang you are using.

> It is worth noting that we do have mods to gtest, so supporting any standard distribution of it seems like a not great idea. The general approach in the past for standalone builds has been to disable testing unless an LLVM source tree is available, and I think that might be the right approach.
> 
> Also, this all kinda becomes moot if LLVM moves to a mono-repo (really not trying to troll here), because people actively developing LLVM projects will basically be forced to have LLVM source trees anyways.
> 
> Thoughts?


https://reviews.llvm.org/D32595





More information about the cfe-commits mailing list