Prior to D157151, there was no mechanism to "disable" unsupported Clang
options in Flang. While the "help" text (flang-new -help) was indeed
configured not to display such options, the Flang compiler driver would
happily consume such options and only issue a warning when there was no
logic to parse it:
flang-new -fno-experimental-relative-c++-abi-vtables file.f90 flang-new: warning: argument unused during compilation: '-fno-experimental-relative-c++-abi-vtables'
D157151 introduces visibility flags. In particular, all Clang options
gain a visibility flag (Default) that can be excluded when in Flang
driver mode. This way the above invocation will lead to:
flang-new: error: unknown argument '-fno-experimental-relative-c++-abi-vtables'; did you mean '-Xclang -fno-experimental-relative-c++-abi-vtables'?
This won't work unless all options/flags supported by Flang have their
visibility flags updated accordingly, hence the changes in Options.td.
Moving forward, this change will allow Flang better control over the
supported options.
Depends on D157151
I presume this TODO can go now?