[docs] Add guide about Undefined Behavior (#119220)
[llvm-project.git] / lldb / source / Plugins / ScriptInterpreter / Python / CMakeLists.txt
blobfd3118aa9c0a88e2b64cf0d753ccc3a86e591871
1 if (APPLE AND LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY)
2   # Work around an issue with the Python headers, which have a modular include
3   # inside an extern "C" block.
4   remove_module_flags()
5 endif()
7 if(NOT LLDB_PYTHON_RELATIVE_PATH)
8   message(FATAL_ERROR "LLDB_PYTHON_RELATIVE_PATH is not set.")
9 endif()
10 add_definitions(-DLLDB_PYTHON_RELATIVE_LIBDIR="${LLDB_PYTHON_RELATIVE_PATH}")
12 if(NOT LLDB_PYTHON_EXE_RELATIVE_PATH)
13   message(FATAL_ERROR "LLDB_PYTHON_EXE_RELATIVE_PATH is not set.")
14 endif()
15 add_definitions(-DLLDB_PYTHON_EXE_RELATIVE_PATH="${LLDB_PYTHON_EXE_RELATIVE_PATH}")
18 if (LLDB_ENABLE_LIBEDIT)
19   list(APPEND LLDB_LIBEDIT_LIBS LibEdit::LibEdit)
20 endif()
22 add_subdirectory(Interfaces)
24 add_lldb_library(lldbPluginScriptInterpreterPython PLUGIN
25   PythonDataObjects.cpp
26   PythonReadline.cpp
27   ScriptInterpreterPython.cpp
29   LINK_LIBS
30     lldbBreakpoint
31     lldbCore
32     lldbDataFormatters
33     lldbHost
34     lldbInterpreter
35     lldbTarget
36     lldbValueObject
37     lldbPluginScriptInterpreterPythonInterfaces
38     ${Python3_LIBRARIES}
39     ${LLDB_LIBEDIT_LIBS}
41   LINK_COMPONENTS
42     Support
43   )