The warning about the superfluous -<os>-version-min compiler option seems a little too strong right now. For now we should only warn about -<os>-version-min options that specify a different OS version to the -target's version.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Eventually it would be nice to also warn about redundant -m*-version-min options, but for now I agree that it would be best to start with warning only when the options are different.
Comment Actions
Just a small suggestion. Looks good otherwise.
lib/Driver/ToolChains/Darwin.cpp | ||
---|---|---|
1536 ↗ | (On Diff #127637) | HadExtra is not ok right? macos10.11.0.1 is not the same as macos10.11.0? |
lib/Driver/ToolChains/Darwin.cpp | ||
---|---|---|
1536 ↗ | (On Diff #127637) | Right, it would be nice to check the extra stuff too. I will commit with the check and a test for the extra part. |
lib/Driver/ToolChains/Darwin.cpp | ||
---|---|---|
1536 ↗ | (On Diff #127637) | And what about "-target x86_64-apple-macos -mmacos-version-min=10.6"? |
lib/Driver/ToolChains/Darwin.cpp | ||
---|---|---|
1536 ↗ | (On Diff #127637) | We will warn on that. |
warn_drv_overriding_flag_option is in the group -Woverriding-t-option (D1290), which is for clang-cl /T* options.
I think we need a different diagnostic group for this purpose. I created D158137 to add warn_drv_overriding_option.