From cd6bbba18612654fdc8aa2508202333694b207ab Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Thu, 22 Jan 2015 18:25:49 +0000 Subject: [PATCH] Fix the -*-version-min option to not try and use the current OS version for iOS and the simulator since llvm/clang will assert and kill LLDB. llvm-svn: 226846 --- lldb/include/lldb/Target/Platform.h | 2 +- lldb/source/Expression/ClangModulesDeclVendor.cpp | 2 +- .../Plugins/Platform/MacOSX/PlatformDarwin.cpp | 79 ++++++++++++++++------ .../Plugins/Platform/MacOSX/PlatformDarwin.h | 2 +- .../Plugins/Platform/MacOSX/PlatformMacOSX.h | 4 +- .../Plugins/Platform/MacOSX/PlatformRemoteiOS.h | 4 +- .../Plugins/Platform/MacOSX/PlatformiOSSimulator.h | 4 +- lldb/source/Target/Platform.cpp | 2 +- 8 files changed, 69 insertions(+), 30 deletions(-) diff --git a/lldb/include/lldb/Target/Platform.h b/lldb/include/lldb/Target/Platform.h index 8b14cc2..9a91c79 100644 --- a/lldb/include/lldb/Target/Platform.h +++ b/lldb/include/lldb/Target/Platform.h @@ -569,7 +569,7 @@ namespace lldb_private { // Appends the platform-specific options required to find the modules for the current platform. virtual void - AddClangModuleCompilationOptions (std::vector &options); + AddClangModuleCompilationOptions (Target *target, std::vector &options); ConstString GetWorkingDirectory (); diff --git a/lldb/source/Expression/ClangModulesDeclVendor.cpp b/lldb/source/Expression/ClangModulesDeclVendor.cpp index 46adaaf..b1ce44a 100644 --- a/lldb/source/Expression/ClangModulesDeclVendor.cpp +++ b/lldb/source/Expression/ClangModulesDeclVendor.cpp @@ -289,7 +289,7 @@ ClangModulesDeclVendor::Create(Target &target) "-Werror=non-modular-include-in-framework-module" }; - target.GetPlatform()->AddClangModuleCompilationOptions(compiler_invocation_arguments); + target.GetPlatform()->AddClangModuleCompilationOptions(&target, compiler_invocation_arguments); compiler_invocation_arguments.push_back(ModuleImportBufferName); diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp index cf1d152..5fb43c6d 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp @@ -1419,7 +1419,7 @@ PlatformDarwin::GetSDKDirectoryForModules (SDKType sdk_type) } void -PlatformDarwin::AddClangModuleCompilationOptionsForSDKType (std::vector &options, SDKType sdk_type) +PlatformDarwin::AddClangModuleCompilationOptionsForSDKType (Target *target, std::vector &options, SDKType sdk_type) { const std::vector apple_arguments = { @@ -1435,28 +1435,67 @@ PlatformDarwin::AddClangModuleCompilationOptionsForSDKType (std::vector