Skip to content

Commit c1d1a75

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 5909979 commit c1d1a75

File tree

6 files changed

+48
-9
lines changed

6 files changed

+48
-9
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPYTHONINTERFACE_H
1111

1212
#if LLDB_ENABLE_PYTHON
13+
// clang-format off
14+
// LLDB Python header must be included first
15+
#include "../lldb-python.h"
16+
//clang-format on
17+
#endif
18+
1319

1420
#include <optional>
1521
#include <sstream>
@@ -21,6 +27,8 @@
2127
#include "lldb/Interpreter/Interfaces/ScriptedInterface.h"
2228
#include "lldb/Utility/DataBufferHeap.h"
2329

30+
#if LLDB_ENABLE_PYTHON
31+
2432
#include "../PythonDataObjects.h"
2533
#include "../SWIGPythonBridge.h"
2634
#include "../ScriptInterpreterPythonImpl.h"

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

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

12+
#if LLDB_ENABLE_PYTHON
13+
// clang-format off
14+
// LLDB Python header must be included first
15+
#include "../lldb-python.h"
16+
//clang-format on
17+
#endif
18+
1219
#include "lldb/Host/Config.h"
1320

1421
#if LLDB_ENABLE_PYTHON

lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,17 @@
4848
#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONDATAOBJECTS_H
4949
#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONDATAOBJECTS_H
5050

51-
#include "lldb/Host/Config.h"
52-
5351
#if LLDB_ENABLE_PYTHON
5452

53+
// clang-format off
5554
// LLDB Python header must be included first
5655
#include "lldb-python.h"
56+
//clang-format on
57+
#endif
58+
59+
#include "lldb/Host/Config.h"
60+
61+
#if LLDB_ENABLE_PYTHON
5762

5863
#include "lldb/Host/File.h"
5964
#include "lldb/Utility/StructuredData.h"

lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,20 @@
99
#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SWIGPYTHONBRIDGE_H
1010
#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SWIGPYTHONBRIDGE_H
1111

12-
#include <optional>
13-
#include <string>
14-
15-
#include "lldb/Host/Config.h"
16-
1712
#if LLDB_ENABLE_PYTHON
1813

14+
// clang-format off
1915
// LLDB Python header must be included first
2016
#include "lldb-python.h"
17+
//clang-format on
18+
#endif
19+
20+
#include "lldb/Host/Config.h"
21+
22+
#include <optional>
23+
#include <string>
24+
25+
#if LLDB_ENABLE_PYTHON
2126

2227
#include "Plugins/ScriptInterpreter/Python/PythonDataObjects.h"
2328
#include "lldb/lldb-forward.h"

lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.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_SCRIPTINTERPRETERPYTHON_H
1010
#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTINTERPRETERPYTHON_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

1422
#if LLDB_ENABLE_PYTHON

lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,17 @@
99
#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTINTERPRETERPYTHONIMPL_H
1010
#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTINTERPRETERPYTHONIMPL_H
1111

12-
#include "lldb/Host/Config.h"
13-
1412
#if LLDB_ENABLE_PYTHON
1513

14+
// clang-format off
15+
// LLDB Python header must be included first
1616
#include "lldb-python.h"
17+
//clang-format on
18+
#endif
19+
20+
#include "lldb/Host/Config.h"
21+
22+
#if LLDB_ENABLE_PYTHON
1723

1824
#include "PythonDataObjects.h"
1925
#include "ScriptInterpreterPython.h"

0 commit comments

Comments
 (0)