diff options
| author | Raphael Isemann <teemperor@gmail.com> | 2018-06-13 15:50:45 +0000 |
|---|---|---|
| committer | Raphael Isemann <teemperor@gmail.com> | 2018-06-13 15:50:45 +0000 |
| commit | 2c77eefe85efa59081c48afa3edb652365f8d1ac (patch) | |
| tree | 34dbe9b0a1f45eefa9f9aa6f4999f361add814d9 /lldb/source/Plugins | |
| parent | f6ee0c9071c1de7c9fc9e81917dcd9ef9b6045d6 (diff) | |
| download | bcm5719-llvm-2c77eefe85efa59081c48afa3edb652365f8d1ac.tar.gz bcm5719-llvm-2c77eefe85efa59081c48afa3edb652365f8d1ac.zip | |
Add modules support for lldb headers in include/
Summary:
This patch adds a modulemap which allows compiling the lldb headers into C++ modules
(for example in builds with LLVM_ENABLE_MODULES=On).
Even though most of the affected code has been cleaned up to work with the more strict
C++ module semantics, there are still some workarounds left in the current modulemap
(the most obvious one is the big `lldb` wrapper module).
It also moves the Obj-C++ files in lldb to their own subdirectories. This was necessary
because we need to filter out the modules flags for this code.
Note: With the latest clang and libstdc++ it seems necessary to have a STL C++ module
to get a working LLVM_ENABLE_MODULES build for lldb. Otherwise clang will falsely
detect ODR violations in the textually included STL code inside the lldb modules.
Reviewers: aprantl, bruno
Reviewed By: aprantl, bruno
Subscribers: mgorny, yamaguchi, v.g.vassilev, lldb-commits
Differential Revision: https://reviews.llvm.org/D47929
llvm-svn: 334611
Diffstat (limited to 'lldb/source/Plugins')
| -rw-r--r-- | lldb/source/Plugins/Platform/MacOSX/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | lldb/source/Plugins/Platform/MacOSX/objcxx/CMakeLists.txt | 18 | ||||
| -rw-r--r-- | lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm (renamed from lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm) | 0 |
3 files changed, 21 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Platform/MacOSX/CMakeLists.txt b/lldb/source/Plugins/Platform/MacOSX/CMakeLists.txt index f8d911b321f..f9663559069 100644 --- a/lldb/source/Plugins/Platform/MacOSX/CMakeLists.txt +++ b/lldb/source/Plugins/Platform/MacOSX/CMakeLists.txt @@ -11,13 +11,14 @@ list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES list(APPEND PLUGIN_PLATFORM_MACOSX_DARWIN_ONLY_SOURCES PlatformAppleSimulator.cpp PlatformiOSSimulator.cpp - PlatformiOSSimulatorCoreSimulatorSupport.mm PlatformAppleTVSimulator.cpp PlatformAppleWatchSimulator.cpp ) if(CMAKE_SYSTEM_NAME MATCHES "Darwin") include_directories(${LIBXML2_INCLUDE_DIR}) + add_subdirectory(objcxx) + set(OBJC_LIBS "lldbPluginPlatformMacOSXObjCXX") list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES ${PLUGIN_PLATFORM_MACOSX_DARWIN_ONLY_SOURCES}) else() @@ -38,6 +39,7 @@ add_lldb_library(lldbPluginPlatformMacOSX PLUGIN lldbTarget lldbUtility lldbPluginPlatformPOSIX + ${OBJC_LIBS} LINK_COMPONENTS Support ) diff --git a/lldb/source/Plugins/Platform/MacOSX/objcxx/CMakeLists.txt b/lldb/source/Plugins/Platform/MacOSX/objcxx/CMakeLists.txt new file mode 100644 index 00000000000..b43c2b528ae --- /dev/null +++ b/lldb/source/Plugins/Platform/MacOSX/objcxx/CMakeLists.txt @@ -0,0 +1,18 @@ +remove_module_flags() +include_directories(..) + +add_lldb_library(lldbPluginPlatformMacOSXObjCXX + PlatformiOSSimulatorCoreSimulatorSupport.mm + + LINK_LIBS + lldbCore + lldbSymbol + lldbTarget + lldbUtility + ${LLDB_PLUGINS} + ${EXTRA_LIBS} + + LINK_COMPONENTS + Object + Support + ) diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm b/lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm index 4516a66ee8c..4516a66ee8c 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm +++ b/lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm |

