[lldb-dev] Standalone build broken after r269332
Pavel Labath via lldb-dev
lldb-dev at lists.llvm.org
Mon May 16 03:04:38 PDT 2016
Hi Eugene,
my thoughts on this are inline.
On 14 May 2016 at 01:46, Eugene Zelenko via lldb-dev
<lldb-dev at lists.llvm.org> wrote:
> Hi!
>
> I tried to build standalone LLDB after r269332 change in
> LLDBStandalone.cmake and encountered next problems:
>
> It implies that LLVM and Clang were built separately, but they could
> be built together, so next changes should be made as in previous
> version:
>
> - include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
> + if (EXISTS "${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
> + include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
> + endif()
This part makes sense. I don't like the "IF EXISTS" part that much,
but if there is no other reasonable way to test for "IF
LLVM_AND_CLANG_BUILT_TOGETHER", then that's fine. Here we have to
diverge from clang standalone build as it does not need to depend on
clang as well as llvm.
>
> Include path for generated LLVM headers were not added, so I made next tweak:
>
> - include_directories("${LLVM_BINARY_DIR}/include" "${LLVM_MAIN_INCLUDE_DIR}")
> + include_directories("${LLVM_OBJ_ROOT}/include"
> "${LLVM_BINARY_DIR}/include" "${LLVM_MAIN_INCLUDE_DIR}")
Sounds reasonable as well (although it might be interesting to check
out how come clang does not need this fix as well).
>
> But biggest problem remains is how to specify Clang source and build
> directories, since llvm-config doesn't tells about them.
>
> Previously I set next variables, but situation may be different when
> LLVM and Clang are built separately:
>
> -DLLDB_PATH_TO_CLANG_BUILD=${LLVMBuildDir}/tools/clang
> -DLLDB_PATH_TO_CLANG_SOURCE=${LLVMSourceDir}/tools/clang
> -DLLDB_PATH_TO_LLVM_BUILD=${LLVMBuildDir}
> -DLLDB_PATH_TO_LLVM_SOURCE=${LLVMSourceDir}
>
At which stage does the build now fail for you (after applying the
fixes above)?
As Kamil said, LLDB really shouldn't depend on the clang source
folder. The only dependency I know of is the uglyness in lldb-mi, but
it looks like it should be easy to fix (basically, lldb-mi should use
the public regex interface instead of the private one, porting
appeared straight-forward), so I think someone should just bite the
bullet and do it. If you need any more changes after that, we can look
into that then.
pl
More information about the lldb-dev
mailing list