Author: Med Ismail Bennani Date: 2024-07-25T13:32:24-07:00 New Revision: c1d1a752cea105dba1aa999bc90feb5faa974bec
URL: https://github.com/llvm/llvm-project/commit/c1d1a752cea105dba1aa999bc90feb5faa974bec DIFF: https://github.com/llvm/llvm-project/commit/c1d1a752cea105dba1aa999bc90feb5faa974bec.diff LOG: [lldb/Plugins] Fix build failure on windows following 2914a4b88837 This patch tries to fix the following build failure on windows: https://lab.llvm.org/buildbot/#/builders/141/builds/1083 This started happening following 2914a4b88837, and it seems to be caused by some special `#include` ordering for the lldb-python header on Windows. Signed-off-by: Med Ismail Bennani <ism...@bennani.ma> Added: Modified: lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPythonInterface.h lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h Removed: ################################################################################ diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h index e1a3156d10afd..74b89a6f6a883 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h @@ -10,6 +10,12 @@ #define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPYTHONINTERFACE_H #if LLDB_ENABLE_PYTHON +// clang-format off +// LLDB Python header must be included first +#include "../lldb-python.h" +//clang-format on +#endif + #include <optional> #include <sstream> @@ -21,6 +27,8 @@ #include "lldb/Interpreter/Interfaces/ScriptedInterface.h" #include "lldb/Utility/DataBufferHeap.h" +#if LLDB_ENABLE_PYTHON + #include "../PythonDataObjects.h" #include "../SWIGPythonBridge.h" #include "../ScriptInterpreterPythonImpl.h" diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPythonInterface.h b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPythonInterface.h index 5676f7f1d6752..7724f9128c514 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPythonInterface.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPythonInterface.h @@ -9,6 +9,13 @@ #ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPYTHONINTERFACE_H #define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPYTHONINTERFACE_H +#if LLDB_ENABLE_PYTHON +// clang-format off +// LLDB Python header must be included first +#include "../lldb-python.h" +//clang-format on +#endif + #include "lldb/Host/Config.h" #if LLDB_ENABLE_PYTHON diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h index 88c1bb7e729e7..f5fb605c2bf3b 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h @@ -48,12 +48,17 @@ #ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONDATAOBJECTS_H #define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONDATAOBJECTS_H -#include "lldb/Host/Config.h" - #if LLDB_ENABLE_PYTHON +// clang-format off // LLDB Python header must be included first #include "lldb-python.h" +//clang-format on +#endif + +#include "lldb/Host/Config.h" + +#if LLDB_ENABLE_PYTHON #include "lldb/Host/File.h" #include "lldb/Utility/StructuredData.h" diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h b/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h index 3026b6113ae8f..efe173aeea8ea 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h @@ -9,15 +9,20 @@ #ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SWIGPYTHONBRIDGE_H #define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SWIGPYTHONBRIDGE_H -#include <optional> -#include <string> - -#include "lldb/Host/Config.h" - #if LLDB_ENABLE_PYTHON +// clang-format off // LLDB Python header must be included first #include "lldb-python.h" +//clang-format on +#endif + +#include "lldb/Host/Config.h" + +#include <optional> +#include <string> + +#if LLDB_ENABLE_PYTHON #include "Plugins/ScriptInterpreter/Python/PythonDataObjects.h" #include "lldb/lldb-forward.h" diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h index 2e8301a85eb6c..c54530e2a5d8f 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h @@ -9,6 +9,14 @@ #ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTINTERPRETERPYTHON_H #define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTINTERPRETERPYTHON_H +#if LLDB_ENABLE_PYTHON + +// clang-format off +// LLDB Python header must be included first +#include "lldb-python.h" +//clang-format on +#endif + #include "lldb/Host/Config.h" #if LLDB_ENABLE_PYTHON diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h index c2024efb395d7..99d5b7ae5553b 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h @@ -9,11 +9,17 @@ #ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTINTERPRETERPYTHONIMPL_H #define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTINTERPRETERPYTHONIMPL_H -#include "lldb/Host/Config.h" - #if LLDB_ENABLE_PYTHON +// clang-format off +// LLDB Python header must be included first #include "lldb-python.h" +//clang-format on +#endif + +#include "lldb/Host/Config.h" + +#if LLDB_ENABLE_PYTHON #include "PythonDataObjects.h" #include "ScriptInterpreterPython.h" _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits