[Lldb-commits] [lldb] aa2c2c8 - Work around a modularization issue in the Python headers.
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Fri May 19 10:23:01 PDT 2023
Author: Adrian Prantl
Date: 2023-05-19T10:22:51-07:00
New Revision: aa2c2c8e3c3fe74f2b374b3fdc703ca7b05f80a0
URL: https://github.com/llvm/llvm-project/commit/aa2c2c8e3c3fe74f2b374b3fdc703ca7b05f80a0
DIFF: https://github.com/llvm/llvm-project/commit/aa2c2c8e3c3fe74f2b374b3fdc703ca7b05f80a0.diff
LOG: Work around a modularization issue in the Python headers.
Added:
Modified:
lldb/source/API/CMakeLists.txt
lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt
Removed:
################################################################################
diff --git a/lldb/source/API/CMakeLists.txt b/lldb/source/API/CMakeLists.txt
index 3e189f387f1ca..238372bdcab19 100644
--- a/lldb/source/API/CMakeLists.txt
+++ b/lldb/source/API/CMakeLists.txt
@@ -6,6 +6,11 @@ if(LLDB_BUILD_FRAMEWORK)
endif()
if(LLDB_ENABLE_PYTHON)
+ if (APPLE AND LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY)
+ # Work around an issue with the Python headers, which have a modular include
+ # inside an extern "C" block.
+ remove_module_flags()
+ endif()
get_target_property(python_bindings_dir swig_wrapper_python BINARY_DIR)
set(lldb_python_wrapper ${python_bindings_dir}/LLDBWrapPython.cpp)
endif()
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt b/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
index d59b7bbf65a28..7236116696424 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
@@ -1,3 +1,9 @@
+if (APPLE AND LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY)
+ # Work around an issue with the Python headers, which have a modular include
+ # inside an extern "C" block.
+ remove_module_flags()
+endif()
+
if(NOT LLDB_PYTHON_RELATIVE_PATH)
message(FATAL_ERROR "LLDB_PYTHON_RELATIVE_PATH is not set.")
endif()
diff --git a/lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt b/lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt
index 90a53bf175105..daaf40dceff1d 100644
--- a/lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt
+++ b/lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt
@@ -1,3 +1,9 @@
+if (APPLE AND LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY)
+ # Work around an issue with the Python headers, which have a modular include
+ # inside an extern "C" block.
+ remove_module_flags()
+endif()
+
add_lldb_unittest(ScriptInterpreterPythonTests
PythonDataObjectsTests.cpp
PythonTestSuite.cpp
More information about the lldb-commits
mailing list