Open arcivanov opened 6 days ago
@llvm/issue-subscribers-lldb
Author: Arcadiy Ivanov (arcivanov)
There are 2 ways of building LLDB. The first way is likely what you're doing, which is building LLVM, Clang, and LLDB together in one unified build. The second way is to build LLVM and Clang separately and then use them as external libraries to build LLDB. The easiest way to do what you want today is configure several LLDB builds, each for a different version of python.
The second way is to build LLVM and Clang separately and then use them as external libraries to build LLDB.
Is this the "standalone" build? https://lldb.llvm.org/resources/build.html#standalone-builds
This requires two build trees to begin with. Am I missing something? Also, this process doesn't seem to be compatible with a 2-stage build.
I so far found that using heavy CCACHEing reduces the lldb rebuilds in a 2-stage build and 1 llvm + core + lldb * 5 pythons takes less than 2 hours on native. That said, it'll mean that it will take about 12 hours emulating aarch64, which is going to suck. :cry:
The second way is to build LLVM and Clang separately and then use them as external libraries to build LLDB.
Is this the "standalone" build? https://lldb.llvm.org/resources/build.html#standalone-builds
Yes.
This requires two build trees to begin with. Am I missing something? Also, this process doesn't seem to be compatible with a 2-stage build.
I so far found that using heavy CCACHEing reduces the lldb rebuilds in a 2-stage build and 1 llvm + core + lldb * 5 pythons takes less than 2 hours on native. That said, it'll mean that it will take about 12 hours emulating aarch64, which is going to suck. 😢
I'm not sure why you need a 2-stage build for LLDB? If you built LLDB standalone, you could be performing a 2-stage build with LLVM+Clang and then use that to build LLDB. LLDB is not set up to build against multiple versions of python, standalone builds are as close as you're going to get at this time. Technically only a small subset of LLDB itself uses Python directly, but some of the parts use Python headers (which would need a rebuild per version) and then the final shared object/dylib would need to link against a specific python library.
That being said, if you felt sufficiently motivated, you could modify lldb's build to support building against multiple versions of Python. I don't know how much work that would be to do though.
The LLDB's Python package is (generally) as follows:
Out of all, the
_lldb
is the only native extension and it is actually theliblldb.so
. Which Python is used is determined by settingPYTHON_HOME
during the initialcmake
run.I'd like to rebuild that extension, i.e.
liblldb.so
, quickly for different versions of Python, since if I just reconfigurecmake
with a different version of Python it'll make me rebuild the whole clang and lldb too and it will take hours and even worse if I have a 2-stage build then it'll take days.Any suggestions?