This is the first patch implementing the new Flang driver as outlined in [1],
[2] & [3]. It created Flang driver (flang-new and Flang frontend driver
(flang-new -fc1) with help screen(-help) and version(--version) options.
These will be renamed as flang and flang -fc1 once the current Flang
throwaway driver, flang, can be replaced
flang-new is implemented in terms of libclangDriver, defaulting the driver
mode to flang (added to libclangDriver in [2]). This ensures that the driver
runs in flang mode regardless of the name of the binary inferred from argv[0].
The design of the new flang compiler and frontend drivers is inspired by it
counterparts in Clang [3]. Currently, the new flang compiler and frontend
drivers re-use Clang libraries: clangBasic, clangDriver and clangFrontend.
To identify Flang options, this patch adds FlangOption enum. printHelp is
updated so that flang-new prints only Flang options.
The new Flang driver is disabled by default. To build it, set
-DBUILD_FLANG_NEW_DRIVER =ON when configuring Flang and LLVM_ENABLE_PROJECTS
with clang.
[1] RFC: new Flang driver - next steps
http://lists.llvm.org/pipermail/flang-dev/2020-July/000470.html
[2] "RFC: Adding a fortran mode to the clang driver for flang"
http://lists.llvm.org/pipermail/cfe-dev/2019-June/062669.html
[3]RFC: refactoring libclangDriver/libclangFrontend to share with Flan
http://lists.llvm.org/pipermail/cfe-dev/2020-July/066393.html
nit: a missing period.
flang mode -> flang mode.