[Lldb-commits] [PATCH] D65798: [lldb][CMake] Infer `Clang_DIR` if not passed explicitly

Saleem Abdulrasool via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 6 13:08:43 PDT 2019


compnerd added inline comments.


================
Comment at: lldb/cmake/modules/LLDBStandalone.cmake:6
+  # next to LLVM's module directory.
+  set(Clang_DIR ${LLVM_DIR}/../clang)
+  message(STATUS "Inferred Clang_DIR: ${Clang_DIR}")
----------------
sgraenitz wrote:
> compnerd wrote:
> > What happens in the standalone clang build scenario?  Can I ask what is the motivation for this change?  I think it is better to require that the user pass the path, as that is an explicit dependency of LLDB.
> I don't think there's any side-effects on Clang standalone builds. Is that what you mean with "standalone clang build scenario"?
> 
> I would like top prevent people from writing custom build scripts on top of CMake. Passing a number of very similar paths to CMake, e.g. each time we want to generate a Xcode project for development, this option seems to become compelling quickly. This patch makes standalone configurations simpler. Basically, it provides a default value. I doesn't cut down functionality.
> 
> You can still explicitly pass any path you want. This branch will then not be taken.
I think that the build fragmentation has caused a larger problem, and I would like to avoid that.  The standalone build scenario is:

build/llvm
build/clang
build/lldb

In this case, `../clang` does not exist (`../../clang/lib/cmake/clang` does).  I think what I would suggest instead is adding a cache file that has the configuration parameters setup already.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65798/new/

https://reviews.llvm.org/D65798





More information about the lldb-commits mailing list