Add a new warning to notify users of mismatched SDK and deployment target
authorChris Bieneman <beanz@apple.com>
Fri, 29 Apr 2016 22:28:34 +0000 (22:28 +0000)
committerChris Bieneman <beanz@apple.com>
Fri, 29 Apr 2016 22:28:34 +0000 (22:28 +0000)
commite60e7c2987f18373ee8e8b1ac1ed3ee964c3c40a
treed688ed4c0c29db7f3ab82481277c7e08fe76c04f
parent107aefc2fc7c93d76c0c0eb35b1b36ff9fb92333
Add a new warning to notify users of mismatched SDK and deployment target

Summary:
This patch adds a new driver warning -Wincompatible-sdk which notifies the user when they are mismatching the version min options and the sysroot.

The patch works by checking the sysroot (if present) for an SDK name, then matching that against the target platform. In the case of a mismatch it logs a warning.

Reviewers: bob.wilson, rsmith

Subscribers: rsmith, edward-san, cfe-commits

Differential Revision: http://reviews.llvm.org/D18088

llvm-svn: 268127
clang/include/clang/Basic/DiagnosticDriverKinds.td
clang/lib/Driver/ToolChains.cpp
clang/lib/Driver/ToolChains.h
clang/test/Driver/incompatible_sysroot.c [new file with mode: 0644]