[PATCH] D155408: [Driver] Also warn about -mwatchos-version-min and -mtvos-version-min

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 17 09:29:58 PDT 2023


ahatanak added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:89
+    // Don't reject these -version-min= if we have the appropriate triple.
     if (T.isiOS())
       for (Arg *A : Args.filtered(options::OPT_mios_version_min_EQ))
----------------
I just realized this isn't correct as it accepts `-mios-version-min=` when the OS is tvOS, e.g.,  `clang -arch armv7m --target=thumbv7-apple-tvos -mios-version-min=5 ...`.

https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/TargetParser/Triple.h#L497

Can you fix this by calling `Triple::getOS()` to check the OS?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155408/new/

https://reviews.llvm.org/D155408



More information about the cfe-commits mailing list