summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/include/lldb/module.modulemap139
-rw-r--r--lldb/source/Host/CMakeLists.txt24
-rw-r--r--lldb/source/Host/common/Terminal.cpp1
-rw-r--r--lldb/source/Host/macosx/objcxx/CMakeLists.txt21
-rw-r--r--lldb/source/Host/macosx/objcxx/Host.mm (renamed from lldb/source/Host/macosx/Host.mm)0
-rw-r--r--lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm (renamed from lldb/source/Host/macosx/HostInfoMacOSX.mm)0
-rw-r--r--lldb/source/Host/macosx/objcxx/HostThreadMacOSX.mm (renamed from lldb/source/Host/macosx/HostThreadMacOSX.mm)0
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/CMakeLists.txt4
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/objcxx/CMakeLists.txt18
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm (renamed from lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm)0
10 files changed, 200 insertions, 7 deletions
diff --git a/lldb/include/lldb/module.modulemap b/lldb/include/lldb/module.modulemap
new file mode 100644
index 00000000000..cec0428c184
--- /dev/null
+++ b/lldb/include/lldb/module.modulemap
@@ -0,0 +1,139 @@
+
+module lldb_API {
+ requires cplusplus
+
+ umbrella "API"
+ module * { export * }
+}
+
+module lldb_Host {
+ requires cplusplus
+
+ // Because we have OS-specific headers in Host, we just list
+ // all OS-independent headers here that will include the correct
+ // OS-specific header for us.
+ module ConnectionFileDescriptor { header "Host/ConnectionFileDescriptor.h" export * }
+ module Debug { header "Host/Debug.h" export * }
+ module Editline { header "Host/Editline.h" export * }
+ module FileCache { header "Host/FileCache.h" export * }
+ module File { header "Host/File.h" export * }
+ module FileSystem { header "Host/FileSystem.h" export * }
+ module HostGetOpt { header "Host/HostGetOpt.h" export * }
+ module Host { header "Host/Host.h" export * }
+ module HostInfoBase { header "Host/HostInfoBase.h" export * }
+ module HostInfo { header "Host/HostInfo.h" export * }
+ module HostNativeProcessBase { header "Host/HostNativeProcessBase.h" export * }
+ module HostNativeProcess { header "Host/HostNativeProcess.h" export * }
+ module HostNativeThreadBase { header "Host/HostNativeThreadBase.h" export * }
+ module HostNativeThreadForward { header "Host/HostNativeThreadForward.h" export * }
+ module HostNativeThread { header "Host/HostNativeThread.h" export * }
+ module HostProcess { header "Host/HostProcess.h" export * }
+ module HostThread { header "Host/HostThread.h" export * }
+ module LockFileBase { header "Host/LockFileBase.h" export * }
+ module LockFile { header "Host/LockFile.h" export * }
+ module MainLoopBase { header "Host/MainLoopBase.h" export * }
+ module MainLoop { header "Host/MainLoop.h" export * }
+ module MonitoringProcessLauncher { header "Host/MonitoringProcessLauncher.h" export * }
+ module OptionParser { header "Host/OptionParser.h" export * }
+ module PipeBase { header "Host/PipeBase.h" export * }
+ module Pipe { header "Host/Pipe.h" export * }
+ module PosixApi { header "Host/PosixApi.h" export * }
+ module Predicate { header "Host/Predicate.h" export * }
+ module ProcessLauncher { header "Host/ProcessLauncher.h" export * }
+ module ProcessRunLock { header "Host/ProcessRunLock.h" export * }
+ module PseudoTerminal { header "Host/PseudoTerminal.h" export * }
+ module SocketAddress { header "Host/SocketAddress.h" export * }
+ module Socket { header "Host/Socket.h" export * }
+ module StringConvert { header "Host/StringConvert.h" export * }
+ module Symbols { header "Host/Symbols.h" export * }
+ module TaskPool { header "Host/TaskPool.h" export * }
+ module Terminal { header "Host/Terminal.h" export * }
+ module ThreadLauncher { header "Host/ThreadLauncher.h" export * }
+ module Time { header "Host/Time.h" export * }
+ module XML { header "Host/XML.h" export * }
+
+ export *
+}
+
+module lldb_Initialization {
+ requires cplusplus
+
+ umbrella "Initialization"
+ module * { export * }
+}
+
+
+module lldb_Wrapper {
+
+ module lldb_Breakpoint {
+ requires cplusplus
+
+ umbrella "Breakpoint"
+ module * { export * }
+ }
+
+ module lldb_Core {
+ requires cplusplus
+
+ umbrella "Core"
+ module * { export * }
+ }
+
+ module lldb_DataFormatters {
+ requires cplusplus
+
+ umbrella "DataFormatters"
+ module * { export * }
+ }
+
+ module lldb_Expression {
+ requires cplusplus
+
+ umbrella "Expression"
+ module * { export * }
+ // TODO: This file includes a non-public header.
+ exclude header "Expression/REPL.h"
+ }
+
+ module lldb_Interpreter {
+ requires cplusplus
+
+ umbrella "Interpreter"
+ module * { export * }
+ }
+
+ module lldb_Symbol {
+ requires cplusplus
+
+ umbrella "Symbol"
+ module * { export * }
+ }
+ module lldb_Target {
+ requires cplusplus
+
+ umbrella "Target"
+ module * { export * }
+ }
+}
+
+
+module lldb_Utility {
+ requires cplusplus
+
+ umbrella "Utility"
+ module * { export * }
+
+ module lldb_defines { header "lldb-defines.h" export * }
+ module lldb_enumerations { header "lldb-enumerations.h" export * }
+ module lldb_forward { header "lldb-forward.h" export * }
+ module lldb_private_enumerations { header "lldb-private-enumerations.h" export * }
+ module lldb_private_defines { header "lldb-private-defines.h" export * }
+ module lldb_private_forward { header "lldb-private-forward.h" export * }
+ module lldb_private { header "lldb-private.h" export * }
+ module lldb_private_interfaces { header "lldb-private-interfaces.h" export * }
+ module lldb_private_types { header "lldb-private-types.h" export * }
+ module lldb_public { header "lldb-public.h" export * }
+ module lldb_types { header "lldb-types.h" export * }
+ module lldb_versioning { header "lldb-versioning.h" export * }
+
+}
diff --git a/lldb/source/Host/CMakeLists.txt b/lldb/source/Host/CMakeLists.txt
index 82d05bf639d..4ae53bd1233 100644
--- a/lldb/source/Host/CMakeLists.txt
+++ b/lldb/source/Host/CMakeLists.txt
@@ -3,6 +3,18 @@ macro(add_host_subdirectory group)
source_group(${group} FILES ${ARGN})
endmacro()
+# Removes all module flags from the current CMAKE_CXX_FLAGS. Used for
+# the Objective-C++ code in lldb which we don't want to build with modules.
+# Reasons for this are that modules with Objective-C++ would require that
+# all LLVM/Clang modules are Objective-C++ compatible (which they are likely
+# not) and we would have rebuild a second set of modules just for the few
+# Objective-C++ files in lldb (which slows down the build process).
+macro(remove_module_flags)
+ string(REGEX REPLACE "-fmodules-cache-path=[^ ]+" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ string(REGEX REPLACE "-fmodules" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ string(REGEX REPLACE "-fcxx-modules" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+endmacro()
+
add_host_subdirectory(common
common/File.cpp
common/FileCache.cpp
@@ -92,10 +104,9 @@ else()
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
include_directories(SYSTEM ${LIBXML2_INCLUDE_DIR})
- add_host_subdirectory(macosx
- macosx/Host.mm
- macosx/HostInfoMacOSX.mm
- macosx/HostThreadMacOSX.mm
+ add_subdirectory(macosx/objcxx)
+ set(LLDBObjCLibs lldbHostMacOSXObjCXX)
+ add_host_subdirectory(maqcosx
macosx/Symbols.cpp
macosx/cfcpp/CFCBundle.cpp
macosx/cfcpp/CFCData.cpp
@@ -177,7 +188,7 @@ endif()
add_lldb_library(lldbHost
${HOST_SOURCES}
-
+
LINK_LIBS
lldbCore
lldbSymbol
@@ -185,7 +196,8 @@ add_lldb_library(lldbHost
lldbUtility
${LLDB_PLUGINS}
${EXTRA_LIBS}
-
+ ${LLDBObjCLibs}
+
LINK_COMPONENTS
Object
Support
diff --git a/lldb/source/Host/common/Terminal.cpp b/lldb/source/Host/common/Terminal.cpp
index 35902dd5ae3..be912fbe615 100644
--- a/lldb/source/Host/common/Terminal.cpp
+++ b/lldb/source/Host/common/Terminal.cpp
@@ -9,6 +9,7 @@
#include "lldb/Host/Terminal.h"
+#include "lldb/Host/Config.h"
#include "lldb/Host/PosixApi.h"
#include "llvm/ADT/STLExtras.h"
diff --git a/lldb/source/Host/macosx/objcxx/CMakeLists.txt b/lldb/source/Host/macosx/objcxx/CMakeLists.txt
new file mode 100644
index 00000000000..1cf59222a29
--- /dev/null
+++ b/lldb/source/Host/macosx/objcxx/CMakeLists.txt
@@ -0,0 +1,21 @@
+
+remove_module_flags()
+include_directories(..)
+
+add_lldb_library(lldbHostMacOSXObjCXX
+ Host.mm
+ HostInfoMacOSX.mm
+ HostThreadMacOSX.mm
+
+ LINK_LIBS
+ lldbCore
+ lldbSymbol
+ lldbTarget
+ lldbUtility
+ ${LLDB_PLUGINS}
+ ${EXTRA_LIBS}
+
+ LINK_COMPONENTS
+ Object
+ Support
+ )
diff --git a/lldb/source/Host/macosx/Host.mm b/lldb/source/Host/macosx/objcxx/Host.mm
index 190295bdf0e..190295bdf0e 100644
--- a/lldb/source/Host/macosx/Host.mm
+++ b/lldb/source/Host/macosx/objcxx/Host.mm
diff --git a/lldb/source/Host/macosx/HostInfoMacOSX.mm b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
index fb9e4e02765..fb9e4e02765 100644
--- a/lldb/source/Host/macosx/HostInfoMacOSX.mm
+++ b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
diff --git a/lldb/source/Host/macosx/HostThreadMacOSX.mm b/lldb/source/Host/macosx/objcxx/HostThreadMacOSX.mm
index c5051cdf30d..c5051cdf30d 100644
--- a/lldb/source/Host/macosx/HostThreadMacOSX.mm
+++ b/lldb/source/Host/macosx/objcxx/HostThreadMacOSX.mm
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
OpenPOWER on IntegriCloud