[Lldb-commits] [PATCH] D74727: Allow customized relative PYTHONHOME

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 19 05:20:02 PST 2020


labath added a comment.

In D74727#1881962 <https://reviews.llvm.org/D74727#1881962>, @JDevlieghere wrote:

> In D74727#1881055 <https://reviews.llvm.org/D74727#1881055>, @hhb wrote:
>
> > > Can we maybe rename it to something like that?
> >
> > LLDB_RELOCATABLE_PYTHON is misleading. I'd be happy to rename it. But that may break people who already set this flag.
> >
> > Is there a standard procedure to do this? Maybe add the new one and remove the old one a year later? Or maybe fail when the old is set. So that at least people know how to fix?
>
>
> We've made breaking changes like that in the past. This might even be a good thing when we're changing behavior.


Yeah, I wouldn't worry about that. When we were doing some dependency refactorings two months ago, we left in some compat code. However, this was only because some buildbots depended on the old options, and the code was removed as soon as those were updated.

But you don't need to worry about that -- I don't see any bot using this option.

>>> Or maybe even just a single LLDB_PYTHON_HOME variable, with the empty value meaning we use the default python mechanism (PYTHONHOME env var, or the baked-in python default)?
>> 
>> To do that, we have to make LLDB_PYTHON_HOME default to PYTHON_HOME for Windows. And if windows users want to make it "relocatable", they should set LLDB_PYTHON_HOME back to empty. That's also somehow weird...

Yes, I can see how that could be confusing. Then let's stick with two options, but rename `LLDB_RELOCATABLE_PYTHON` to indicate that is really about hardcoding the PYTHONHOME path?

>>> The other thing which bugs me is that the relative python path chosen here will likely only be correct once lldb is installed. Will it be possible to run lldb (and its test suite) configured in this way directly from the build tree? I don't know if there's anything we can or should do about that, but this situation seems less than ideal...
>> 
>> If someone uses relative python, that mean they should be responsible to put Python at the right place. No matter it is build tree or install tree. Or in other words, the install tree won't work by default either. People still need to put a symlink to python at the right place.

Yeah, that makes kind of sense. I think I can go with that...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74727





More information about the lldb-commits mailing list