
This patch tries to fix an issue with the windows debug builds where the PDB file for python scripted interfaces cannot be opened since its path length exceed the windows `MAX_PATH` limit: https://github.com/llvm/llvm-project/pull/101672#issuecomment-2289481324 This patch addresses the issue by building all the interfaces as a single library plugin that initiliazes each component as part of its `Initialize` method, instead of building each interface as its own library plugin. This keeps the build artifact path length smaller while respecting the naming convention and without making any exception in the build system. Fixes #104895. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
44 lines
1.1 KiB
CMake
44 lines
1.1 KiB
CMake
if (APPLE AND LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY)
|
|
# Work around an issue with the Python headers, which have a modular include
|
|
# inside an extern "C" block.
|
|
remove_module_flags()
|
|
endif()
|
|
|
|
if(NOT LLDB_PYTHON_RELATIVE_PATH)
|
|
message(FATAL_ERROR "LLDB_PYTHON_RELATIVE_PATH is not set.")
|
|
endif()
|
|
add_definitions(-DLLDB_PYTHON_RELATIVE_LIBDIR="${LLDB_PYTHON_RELATIVE_PATH}")
|
|
|
|
if(NOT LLDB_PYTHON_EXE_RELATIVE_PATH)
|
|
message(FATAL_ERROR "LLDB_PYTHON_EXE_RELATIVE_PATH is not set.")
|
|
endif()
|
|
add_definitions(-DLLDB_PYTHON_EXE_RELATIVE_PATH="${LLDB_PYTHON_EXE_RELATIVE_PATH}")
|
|
|
|
|
|
if (LLDB_ENABLE_LIBEDIT)
|
|
list(APPEND LLDB_LIBEDIT_LIBS LibEdit::LibEdit)
|
|
endif()
|
|
|
|
add_lldb_library(lldbPluginScriptInterpreterPythonInterfaces PLUGIN
|
|
OperatingSystemPythonInterface.cpp
|
|
ScriptInterpreterPythonInterfaces.cpp
|
|
ScriptedPlatformPythonInterface.cpp
|
|
ScriptedProcessPythonInterface.cpp
|
|
ScriptedPythonInterface.cpp
|
|
ScriptedThreadPlanPythonInterface.cpp
|
|
ScriptedThreadPythonInterface.cpp
|
|
|
|
LINK_LIBS
|
|
lldbCore
|
|
lldbHost
|
|
lldbInterpreter
|
|
lldbTarget
|
|
${Python3_LIBRARIES}
|
|
${LLDB_LIBEDIT_LIBS}
|
|
|
|
LINK_COMPONENTS
|
|
Support
|
|
)
|
|
|
|
|