FWIW, Python provides stable ABI <https://www.python.org/dev/peps/pep-0384/> for a subset of their API.
I've actually managed to create a version of LLDB that is Python-optional and Python version-agnostic (for versions 3.3 up). Though given the number of hoops I had to jump through to get there, I cannot recommend this approach for mainline LLDB. On Fri, Nov 22, 2019 at 9:39 AM Adrian McCarthy via lldb-dev < lldb-dev@lists.llvm.org> wrote: > Yes, I think it's pretty reasonable to expect a specific version of > Python, especially if the pre-built Python DLLs for Windows are still built > with versions as old as VS 2013. Once you get to VS 2015 or 2017, I think > the compatibility improves. > > Perhaps the best thing for the pre-built LLDB is to include the right > Python DLL in the distro, assuming the licensing allows that. > > The more sophisticated solutions are probably more work than is justified > by the value. > > On Fri, Nov 22, 2019 at 8:29 AM Ted Woodward <tedw...@quicinc.com> wrote: > >> >> >> > > * Dynamically load any supported Python DLL if/when needed >> > That might be tricky since the different versions are not binary >> compatible in >> > general. But it is possible, as Apple folks have shown, though it >> amounts to >> > building multiple copies of ScriptInterpreterPython and then choosing >> the >> > right one at runtime. >> >> It's not just the python dll; it's the modules directory as well. My >> experiments with different versions of Python on Linux led me to just ship >> the right python with our distribution. >> >> I saw things like building with 2.7.6 but using the 2.7.3 library/modules >> (and vice versa) would crash, and building with 2.7.6 but running with >> 2.6.x seemed to be OK, mostly. On Windows, I had crashes when loading >> Python 2.7.8 from python.org (built with VS 2008) in lldb built with VS >> 2013, so you have to think about other library dependencies too. >> >> My conclusion - you MUST use the same python that lldb was built with. >> Period. >> > _______________________________________________ > lldb-dev mailing list > lldb-dev@lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev >
_______________________________________________ lldb-dev mailing list lldb-dev@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev