[Lldb-commits] [lldb] [lldb] fix python extension debug suffix on Win (PR #89037)

Alexander M. via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 17 02:04:42 PDT 2024


amordo wrote:

> Looks fine but can you just confirm what
> 
> https://github.com/llvm/llvm-project/blob/d1a69e4a6ee0b04778da7728123c47eef2290564/lldb/bindings/python/get-python-config.py#L70
> 
> reports?
> I assume this does not include `_d`, otherwise there would be no need for this fix?

```
C:\Users\iammorjj\llvm-project\lldb\bindings\python>python get-python-config.py LLDB_PYTHON_EXT_SUFFIX
.cp312-win_amd64.pyd

C:\Users\iammorjj\llvm-project\lldb\bindings\python>python_d get-python-config.py LLDB_PYTHON_EXT_SUFFIX
_d.cp312-win_amd64.pyd
```
Now I suppose the problem comes from 
```
foreach(var LLDB_PYTHON_RELATIVE_PATH LLDB_PYTHON_EXE_RELATIVE_PATH LLDB_PYTHON_EXT_SUFFIX)
    if(NOT DEFINED ${var} AND NOT CMAKE_CROSSCOMPILING)
      execute_process(
        COMMAND ${Python3_EXECUTABLE}
          ${CMAKE_CURRENT_SOURCE_DIR}/bindings/python/get-python-config.py
          ${var}
        OUTPUT_VARIABLE value
        OUTPUT_STRIP_TRAILING_WHITESPACE)
      file(TO_CMAKE_PATH "${value}" value)
      set(${var} ${value} CACHE STRING ${cachestring_${var}})
```
where `Python3_EXECUTABLE` is Release python

https://github.com/llvm/llvm-project/pull/89037


More information about the lldb-commits mailing list