File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -87,9 +87,11 @@ if (LLDB_ENABLE_PYTHON)
8787 set (LLDB_PYTHON_EXT_SUFFIX "_d${LLDB_PYTHON_EXT_SUFFIX} " )
8888 endif ()
8989 endif ()
90- get_target_property (_Python3_LIB_PATH Python3::Python IMPORTED_LIBRARY_LOCATION)
91- if (_Python3_LIB_PATH)
92- get_filename_component (LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME "${_Python3_LIB_PATH} " NAME )
90+ if (TARGET Python3::Python)
91+ get_target_property (_Python3_LIB_PATH Python3::Python IMPORTED_LIBRARY_LOCATION)
92+ if (_Python3_LIB_PATH)
93+ get_filename_component (LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME "${_Python3_LIB_PATH} " NAME )
94+ endif ()
9395 endif ()
9496endif ()
9597
Original file line number Diff line number Diff line change @@ -455,9 +455,8 @@ inline std::wstring GetPathToExecutableW() {
455455// / `false` otherwise.
456456bool AddPythonDLLToSearchPath () {
457457 std::wstring modulePath = GetPathToExecutableW ();
458- if (modulePath.empty ()) {
458+ if (modulePath.empty ())
459459 return false ;
460- }
461460
462461 SmallVector<char , MAX_PATH> utf8Path;
463462 if (sys::windows::UTF16ToUTF8 (modulePath.c_str (), modulePath.length (),
@@ -501,8 +500,8 @@ void SetupPythonRuntimeLibrary() {
501500 if (AddPythonDLLToSearchPath ())
502501 return ;
503502#endif
504- llvm::errs () << " error: unable to find "
505- << LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME << " .\n " ;
503+ llvm::errs () << " error: unable to find ' "
504+ << LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME << " ' .\n " ;
506505 return ;
507506#elif defined(LLDB_PYTHON_DLL_RELATIVE_PATH)
508507 if (!AddPythonDLLToSearchPath ())
You can’t perform that action at this time.
0 commit comments