Skip to content

Commit c3a2efc

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 f48c166 commit c3a2efc

File tree

4 files changed

+34
-10
lines changed

4 files changed

+34
-10
lines changed

lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/OperatingSystemPythonInterface/OperatingSystemPythonInterface.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_OPERATINGSYSTEMPYTHONINTERFACE_H
1010
#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_OPERATINGSYSTEMPYTHONINTERFACE_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/OperatingSystemInterface.h"
1422

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@
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+
16+
#endif
17+
918
#include "lldb/Core/PluginManager.h"
1019
#include "lldb/Host/Config.h"
1120
#include "lldb/Target/ExecutionContext.h"
@@ -15,11 +24,6 @@
1524

1625
#if LLDB_ENABLE_PYTHON
1726

18-
// clang-format off
19-
// LLDB Python header must be included first
20-
#include "../../lldb-python.h"
21-
//clang-format on
22-
2327
#include "../../SWIGPythonBridge.h"
2428
#include "../../ScriptInterpreterPythonImpl.h"
2529
#include "ScriptedPlatformPythonInterface.h"

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
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/Core/PluginManager.h"
1018
#include "lldb/Host/Config.h"
1119
#include "lldb/Target/Process.h"
@@ -15,11 +23,6 @@
1523

1624
#if LLDB_ENABLE_PYTHON
1725

18-
// clang-format off
19-
// LLDB Python header must be included first
20-
#include "../../lldb-python.h"
21-
//clang-format on
22-
2326
#include "../../SWIGPythonBridge.h"
2427
#include "../../ScriptInterpreterPythonImpl.h"
2528
#include "../ScriptedThreadPythonInterface.h"

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@
99
#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPLANPYTHONINTERFACE_H
1010
#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDTHREADPLANPYTHONINTERFACE_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+
19+
#endif
20+
1221
#include "lldb/Host/Config.h"
1322
#include "lldb/Interpreter/Interfaces/ScriptedThreadPlanInterface.h"
1423

0 commit comments

Comments
 (0)