Add LangOptions::EnableTargetOSChecking, so that LLDB can ignore OS mismatches.

In particular, this is problematic when libraries are loaded dynamically, and
may have newer deployment targets than the main executable.

Swift SVN r26786
This commit is contained in:
Jordan Rose
2015-04-01 01:12:29 +00:00
parent 13e8137113
commit 960a4f164a
5 changed files with 22 additions and 1 deletions

View File

@@ -1007,7 +1007,9 @@ Status ModuleFile::associateWithFileContext(FileUnit *file,
if (!areCompatibleArchitectures(moduleTarget, ctx.LangOpts.Target) ||
!areCompatibleOSs(moduleTarget, ctx.LangOpts.Target)) {
return error(Status::TargetIncompatible);
} else if (isTargetTooNew(moduleTarget, ctx.LangOpts.Target)) {
}
if (ctx.LangOpts.EnableTargetOSChecking &&
isTargetTooNew(moduleTarget, ctx.LangOpts.Target)) {
return error(Status::TargetTooNew);
}