Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Seems legit. But I've never built standalone, so I probably shouldn't be a reviewer for this.
Comment Actions
I don't build cmake either, I am probably not a great person to ask. Todd Fiala might be a good person.
Comment Actions
Okay, so run this on the current HEAD:
$ cmake -GNinja -DCMAKE_BUILD_TYPE=Debug ../lldb -- The C compiler identification is AppleClang 6.1.0.6020053 -- The CXX compiler identification is AppleClang 6.1.0.6020053 -- Check for working C compiler using: Ninja -- Check for working C compiler using: Ninja -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler using: Ninja -- Check for working CXX compiler using: Ninja -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at cmake/modules/LLDBStandalone.cmake:37 (get_filename_component): get_filename_component called with incorrect number of arguments Call Stack (most recent call first): CMakeLists.txt:3 (include) CMake Error at cmake/modules/LLDBStandalone.cmake:40 (get_filename_component): get_filename_component called with incorrect number of arguments Call Stack (most recent call first): CMakeLists.txt:3 (include) CMake Error at cmake/modules/LLDBStandalone.cmake:48 (include): include could not find load file: AddLLVM Call Stack (most recent call first): CMakeLists.txt:3 (include) CMake Error at cmake/modules/LLDBStandalone.cmake:49 (include): include could not find load file: HandleLLVMOptions Call Stack (most recent call first): CMakeLists.txt:3 (include) -- Found PythonInterp: CMake Error at cmake/modules/LLDBStandalone.cmake:63 (include): include could not find load file: /share/llvm/cmake/LLVMConfig.cmake Call Stack (most recent call first): CMakeLists.txt:3 (include) -- Found PythonLibs: /usr/lib/libpython2.7.dylib (found version "2.7.10") CMake Error at cmake/modules/LLDBConfig.cmake:205 (check_cxx_compiler_flag): Unknown CMake command "check_cxx_compiler_flag". Call Stack (most recent call first): CMakeLists.txt:4 (include) -- Configuring incomplete, errors occurred! See also "/home/rramacha/src/lldb-build2/CMakeFiles/CMakeOutput.log".
Cryptic syntax errors right? Now apply the patch and run:
$ cmake -GNinja -DCMAKE_BUILD_TYPE=Debug ../lldb -- The C compiler identification is AppleClang 6.1.0.6020053 -- The CXX compiler identification is AppleClang 6.1.0.6020053 -- Check for working C compiler using: Ninja -- Check for working C compiler using: Ninja -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler using: Ninja -- Check for working CXX compiler using: Ninja -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at cmake/modules/LLDBStandalone.cmake:43 (message): Please set LLDB_PATH_TO_LLVM_BUILD to the root directory of LLVM build or install site. Call Stack (most recent call first): CMakeLists.txt:3 (include) -- Configuring incomplete, errors occurred! See also "/home/rramacha/src/lldb-build2/CMakeFiles/CMakeOutput.log".
Great. To fix that, run:
$ cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DLLDB_PATH_TO_LLVM_BUILD=~/src/llvm-build ../lldb -- The C compiler identification is AppleClang 6.1.0.6020053 -- The CXX compiler identification is AppleClang 6.1.0.6020053 -- Check for working C compiler using: Ninja -- Check for working C compiler using: Ninja -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler using: Ninja -- Check for working CXX compiler using: Ninja -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at cmake/modules/LLDBStandalone.cmake:51 (message): Please set LLDB_PATH_TO_CLANG_BUILD to the root directory of Clang build or install site. Call Stack (most recent call first): CMakeLists.txt:3 (include) -- Configuring incomplete, errors occurred! See also "/home/rramacha/src/lldb-build2/CMakeFiles/CMakeOutput.log".
To build successfully, you need to (with or without the patch):
$ cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DLLDB_PATH_TO_LLVM_SOURCE=~/src/llvm -DLLDB_PATH_TO_LLVM_BUILD=~/src/llvm-build -DLLDB_PATH_TO_CLANG_SOURCE=~/src/clang -DLLDB_PATH_TO_CLANG_BUILD=~/src/clang-build ../lldb
The patch doesn't solve all issues: for instance, what happens when LLDB_PATH_TO_{LLVM,CLANG}_SOURCE isn't suitable? Why can't I query llvm-config and get all these paths? (and hopefully link against the installed version).
But I think it's a step forward. I think we should encourage people to build lldb standalone, so they can iterate faster.