Work around a modularization issue in the Python headers.
authorAdrian Prantl <aprantl@apple.com>
Fri, 19 May 2023 17:22:27 +0000 (10:22 -0700)
committerAdrian Prantl <aprantl@apple.com>
Fri, 19 May 2023 17:22:51 +0000 (10:22 -0700)
lldb/source/API/CMakeLists.txt
lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt

index 3e189f3..238372b 100644 (file)
@@ -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()
index d59b7bb..7236116 100644 (file)
@@ -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()
index 90a53bf..daaf40d 100644 (file)
@@ -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