aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/Debugify.cpp
diff options
context:
space:
mode:
authorMarkus Böck <markus.boeck02@gmail.com>2023-01-06 09:54:55 +0100
committerMarkus Böck <markus.boeck02@gmail.com>2023-01-06 09:58:35 +0100
commit9e84e038447e283d020ae01aebb15e0e66ef3642 (patch)
tree1ed74d8025accb22e854576a74ca8a70349f058c /llvm/lib/Transforms/Utils/Debugify.cpp
parent241cb29187569274bbf327478e1665ff76528878 (diff)
downloadllvm-9e84e038447e283d020ae01aebb15e0e66ef3642.zip
llvm-9e84e038447e283d020ae01aebb15e0e66ef3642.tar.gz
llvm-9e84e038447e283d020ae01aebb15e0e66ef3642.tar.bz2
[lldb] Allow configuring on Windows with python interpreter within a junction
The current implementation nicely takes into account when the python interpreter is symlinked (or transitively within a symlinked directory). Sadly, `os.path.islink` returns `false` on Windows if instead of Windows symlinks, junctions are used. This has caused me issues after I started using `scoop` as my package manager on Windows, which creates junctions instead of symlinks. The fix proposed in this patch is to check whether `realpath` returns a different path to `exe`, and if it does, to simply try again with that path. The code could also be simplified since `sys.executable` is guaranteed to be absolute, and `os.readlink`, which can return a relative path, is no longer used. Tested on Windows 11 with Python 3.11 as interpreter and Ubuntu 18.04 with Python 3.6 Differential Revision: https://reviews.llvm.org/D141042
Diffstat (limited to 'llvm/lib/Transforms/Utils/Debugify.cpp')
0 files changed, 0 insertions, 0 deletions