[clang][flang] Moke the definition of `-module-dir` restricted to Flang

Authored by awarzynski on Mar 20 2021, 8:26 AM.


[clang][flang] Moke the definition of -module-dir restricted to Flang

-module-dir is a Flang specific option and should not be visible in
Clang. This patch adds FlangOnlyOption flag to its definition. This
way Clang will know that it should reject it and skip it when generating
output for clang -help.

The definition of -module-dir is moved next to other Flang options.
As -J is an alias for -module-dir, it has to be moved as well (the
alias cannot be defined before the original option). As gfortran mode
is effectively no longer supported (*), -J is claimed as Flang only

This is a follow-up of a post-commit review for

Differential Revision: https://reviews.llvm.org/D99018