Skip to content

Commit 0d4f948

Browse files
committed
[lldb/Plugins] Fix build failure on windows following 2914a4b
This patch tries to fix the following build failure on windows: https://lab.llvm.org/buildbot/#/builders/141/builds/1083 This started happening following 2914a4b, and it seems to be caused by some special `#include` ordering for the lldb-python header on Windows. Signed-off-by: Med Ismail Bennani <[email protected]>
1 parent e788788 commit 0d4f948

File tree

8 files changed

+51
-19
lines changed

8 files changed

+51
-19
lines changed

lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPlatformPythonInterface/ScriptedPlatformPythonInterface.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
// LLDB Python header must be included first
1313
#include "../../lldb-python.h"
1414
//clang-format on
15-
1615
#endif
1716

1817
#include "lldb/Core/PluginManager.h"

lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPlatformPythonInterface/ScriptedPlatformPythonInterface.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@
99
#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPLATFORMPYTHONINTERFACE_H
1010
#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPLATFORMPYTHONINTERFACE_H
1111

12+
#if LLDB_ENABLE_PYTHON
13+
14+
// clang-format off
15+
// LLDB Python header must be included first
16+
#include "../../lldb-python.h"
17+
//clang-format on
18+
#endif
19+
1220
#include "lldb/Host/Config.h"
1321
#include "lldb/Interpreter/Interfaces/ScriptedPlatformInterface.h"
1422

lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface/ScriptedProcessPythonInterface.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@
99
#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPROCESSPYTHONINTERFACE_H
1010
#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPROCESSPYTHONINTERFACE_H
1111

12+
#if LLDB_ENABLE_PYTHON
13+
14+
// clang-format off
15+
// LLDB Python header must be included first
16+
#include "../../lldb-python.h"
17+
//clang-format on
18+
#endif
19+
1220
#include "lldb/Host/Config.h"
1321
#include "lldb/Interpreter/Interfaces/ScriptedProcessInterface.h"
1422

lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,20 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#if LLDB_ENABLE_PYTHON
10+
11+
// clang-format off
12+
// LLDB Python header must be included first
13+
#include "../../lldb-python.h"
14+
//clang-format on
15+
#endif
16+
917
#include "lldb/Host/Config.h"
1018
#include "lldb/Utility/Log.h"
1119
#include "lldb/lldb-enumerations.h"
1220

1321
#if LLDB_ENABLE_PYTHON
1422

15-
// LLDB Python header must be included first
16-
#include "../lldb-python.h"
17-
1823
#include "../ScriptInterpreterPythonImpl.h"
1924
#include "ScriptedPythonInterface.h"
2025
#include <optional>

lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,16 @@
1616
//clang-format on
1717
#endif
1818

19+
#include "lldb/Host/Config.h"
20+
#include "lldb/Interpreter/Interfaces/ScriptedInterface.h"
21+
#include "lldb/Utility/DataBufferHeap.h"
1922

2023
#include <optional>
2124
#include <sstream>
2225
#include <tuple>
2326
#include <type_traits>
2427
#include <utility>
2528

26-
#include "lldb/Host/Config.h"
27-
#include "lldb/Interpreter/Interfaces/ScriptedInterface.h"
28-
#include "lldb/Utility/DataBufferHeap.h"
29-
3029
#if LLDB_ENABLE_PYTHON
3130

3231
#include "../PythonDataObjects.h"

lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPlanPythonInterface/ScriptedThreadPlanPythonInterface.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,20 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "lldb/Core/PluginManager.h"
10-
#include "lldb/Host/Config.h"
11-
#include "lldb/Utility/Log.h"
12-
#include "lldb/lldb-enumerations.h"
13-
149
#if LLDB_ENABLE_PYTHON
1510

1611
// clang-format off
1712
// LLDB Python header must be included first
1813
#include "../../lldb-python.h"
1914
//clang-format on
15+
#endif
16+
17+
#include "lldb/Core/PluginManager.h"
18+
#include "lldb/Host/Config.h"
19+
#include "lldb/Utility/Log.h"
20+
#include "lldb/lldb-enumerations.h"
21+
22+
#if LLDB_ENABLE_PYTHON
2023

2124
#include "../../SWIGPythonBridge.h"
2225
#include "../../ScriptInterpreterPythonImpl.h"

lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPythonInterface.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,21 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#if LLDB_ENABLE_PYTHON
10+
11+
// clang-format off
12+
// LLDB Python header must be included first
13+
#include "../../lldb-python.h"
14+
//clang-format on
15+
#endif
16+
917
#include "lldb/Host/Config.h"
1018
#include "lldb/Target/ExecutionContext.h"
1119
#include "lldb/Utility/Log.h"
1220
#include "lldb/lldb-enumerations.h"
1321

1422
#if LLDB_ENABLE_PYTHON
1523

16-
// LLDB Python header must be included first
17-
#include "../lldb-python.h"
18-
1924
#include "../SWIGPythonBridge.h"
2025
#include "../ScriptInterpreterPythonImpl.h"
2126
#include "ScriptedThreadPythonInterface.h"

lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,19 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#if LLDB_ENABLE_PYTHON
10+
11+
// clang-format off
12+
// LLDB Python header must be included first
13+
#include "../../lldb-python.h"
14+
//clang-format on
15+
#endif
16+
917
#include "lldb/Host/Config.h"
1018
#include "lldb/lldb-enumerations.h"
1119

1220
#if LLDB_ENABLE_PYTHON
1321

14-
// LLDB Python header must be included first
15-
#include "lldb-python.h"
16-
1722
#include "Interfaces/OperatingSystemPythonInterface/OperatingSystemPythonInterface.h"
1823
#include "Interfaces/ScriptedPlatformPythonInterface/ScriptedPlatformPythonInterface.h"
1924
#include "Interfaces/ScriptedProcessPythonInterface/ScriptedProcessPythonInterface.h"

0 commit comments

Comments
 (0)