Index: source/Initialization/SystemInitializerCommon.cpp =================================================================== --- source/Initialization/SystemInitializerCommon.cpp +++ source/Initialization/SystemInitializerCommon.cpp @@ -31,13 +31,13 @@ #include "Plugins/Platform/FreeBSD/PlatformFreeBSD.h" #include "Plugins/Platform/Kalimba/PlatformKalimba.h" #include "Plugins/Platform/Linux/PlatformLinux.h" -#include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h" #include "Plugins/Platform/MacOSX/PlatformMacOSX.h" #include "Plugins/Platform/MacOSX/PlatformRemoteiOS.h" #include "Plugins/Platform/Windows/PlatformWindows.h" #include "Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h" #if defined(__APPLE__) +#include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h" #include "Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h" #include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h" #include "Plugins/Platform/MacOSX/PlatformDarwinKernel.h" @@ -130,9 +130,9 @@ PlatformRemoteiOS::Initialize(); PlatformMacOSX::Initialize(); - PlatformiOSSimulator::Initialize(); #if defined(__APPLE__) + PlatformiOSSimulator::Initialize(); DynamicLoaderDarwinKernel::Initialize(); PlatformDarwinKernel::Initialize(); ObjectFileMachO::Initialize(); @@ -168,7 +168,6 @@ ObjectContainerUniversalMachO::Terminate(); PlatformMacOSX::Terminate(); PlatformRemoteiOS::Terminate(); - PlatformiOSSimulator::Terminate(); ClangASTContext::Terminate(); GoASTContext::Terminate(); @@ -178,6 +177,7 @@ EmulateInstructionMIPS64::Terminate(); #if defined(__APPLE__) + PlatformiOSSimulator::Terminate(); DynamicLoaderDarwinKernel::Terminate(); ObjectFileMachO::Terminate(); PlatformDarwinKernel::Terminate(); Index: source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp =================================================================== --- source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -60,7 +60,9 @@ #include "AppleObjCDeclVendor.h" #include "AppleObjCTrampolineHandler.h" +#if defined(__APPLE__) #include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h" +#endif using namespace lldb; using namespace lldb_private; @@ -1765,7 +1767,8 @@ { if (m_noclasses_warning_emitted) return; - + +#if defined(__APPLE__) if (m_process && m_process->GetTarget().GetPlatform() && m_process->GetTarget().GetPlatform()->GetPluginName() == PlatformiOSSimulator::GetPluginNameStatic()) @@ -1775,7 +1778,8 @@ m_noclasses_warning_emitted = true; return; } - +#endif + Debugger &debugger(GetProcess()->GetTarget().GetDebugger()); if (debugger.GetAsyncOutputStream()) Index: source/Plugins/Platform/MacOSX/CMakeLists.txt =================================================================== --- source/Plugins/Platform/MacOSX/CMakeLists.txt +++ source/Plugins/Platform/MacOSX/CMakeLists.txt @@ -1,16 +1,22 @@ list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES - PlatformAppleSimulator.cpp PlatformDarwin.cpp PlatformDarwinKernel.cpp - PlatformiOSSimulator.cpp PlatformMacOSX.cpp PlatformRemoteiOS.cpp ) -if(CMAKE_SYSTEM_NAME MATCHES "Darwin") -list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES +list(APPEND PLUGIN_PLATFORM_MACOSX_DARWIN_ONLY_SOURCES + PlatformAppleSimulator.cpp + PlatformiOSSimulator.cpp PlatformiOSSimulatorCoreSimulatorSupport.mm ) + +if(CMAKE_SYSTEM_NAME MATCHES "Darwin") + list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES + ${PLUGIN_PLATFORM_MACOSX_DARWIN_ONLY_SOURCES}) +else() + list(APPEND LLVM_OPTIONAL_SOURCES + ${PLUGIN_PLATFORM_MACOSX_DARWIN_ONLY_SOURCES}) endif() add_lldb_library(lldbPluginPlatformMacOSX ${PLUGIN_PLATFORM_MACOSX_SOURCES})