diff options
author | Chris Bieneman <beanz@apple.com> | 2016-04-29 22:28:34 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2016-04-29 22:28:34 +0000 |
commit | e60e7c2987f18373ee8e8b1ac1ed3ee964c3c40a (patch) | |
tree | d688ed4c0c29db7f3ab82481277c7e08fe76c04f /clang/include | |
parent | 107aefc2fc7c93d76c0c0eb35b1b36ff9fb92333 (diff) | |
download | bcm5719-llvm-e60e7c2987f18373ee8e8b1ac1ed3ee964c3c40a.tar.gz bcm5719-llvm-e60e7c2987f18373ee8e8b1ac1ed3ee964c3c40a.zip |
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
Diffstat (limited to 'clang/include')
-rw-r--r-- | clang/include/clang/Basic/DiagnosticDriverKinds.td | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/include/clang/Basic/DiagnosticDriverKinds.td b/clang/include/clang/Basic/DiagnosticDriverKinds.td index 2eab9b6428d..e723e9dc1d3 100644 --- a/clang/include/clang/Basic/DiagnosticDriverKinds.td +++ b/clang/include/clang/Basic/DiagnosticDriverKinds.td @@ -198,6 +198,8 @@ def warn_drv_pch_not_first_include : Warning< "precompiled header '%0' was ignored because '%1' is not first '-include'">; def warn_missing_sysroot : Warning<"no such sysroot directory: '%0'">, InGroup<DiagGroup<"missing-sysroot">>; +def warn_incompatible_sysroot : Warning<"using sysroot for '%0' but targeting '%1'">, + InGroup<DiagGroup<"incompatible-sysroot">>; def warn_debug_compression_unavailable : Warning<"cannot compress debug sections (zlib not installed)">, InGroup<DiagGroup<"debug-compression-unavailable">>; def warn_drv_enabling_rtti_with_exceptions : Warning< |