This is an archive of the discontinued LLVM Phabricator instance.

MC: Warn on .xxx_version_min <-> target triple version mismatch
Needs ReviewPublic

Authored by MatzeB on Nov 25 2015, 2:34 PM.

Details

Summary

Warn if the .{ios|tvos|macosx|watchos}_version_min version does not match the target triple.

Diff Detail

Repository
rL LLVM

Event Timeline

MatzeB updated this revision to Diff 41187.Nov 25 2015, 2:34 PM
MatzeB retitled this revision from to MC: Warn on .xxx_version_min <-> target triple version mismatch.
MatzeB updated this object.
MatzeB set the repository for this revision to rL LLVM.
MatzeB added a subscriber: llvm-commits.
t.p.northover edited edge metadata.Nov 25 2015, 2:40 PM

This might be a bit overzealous. A simple "clang -arch armv7s myfile.s" defaults to an ios5.0 triple rather than an unspecified version, but I'd prefer not to have to tell clang both on the command-line and in a directive about the version (and to have to keep them in sync).

This might be a bit overzealous. A simple "clang -arch armv7s myfile.s" defaults to an ios5.0 triple rather than an unspecified version, but I'd prefer not to have to tell clang both on the command-line and in a directive about the version (and to have to keep them in sync).

The intention was to not perform the check if no version was specified on the commandline, but if there is no way to tell if we have an explicitely specified version or a default in the target triple for the "clang -cc1as" invocation, then I guess there is no way to produce a warning without false positives here.