[flang] Add -J and -module-dir to f18 driver
authorTim Keith <tkeith@nvidia.com>
Mon, 22 Feb 2021 17:03:19 +0000 (09:03 -0800)
committerTim Keith <tkeith@nvidia.com>
Mon, 22 Feb 2021 17:03:31 +0000 (09:03 -0800)
commit8720ec6b9a288b686089c5137dda64001a7a9f38
tree364eeb02e911233ce0b011a94a83d7768bb5c572
parent476ff0327b7a97af50a15c7a8c3e0a6513627a8e
[flang] Add -J and -module-dir to f18 driver

Add -J to the f18 driver for compatibility with gfortran.
Add -module-dir for compatibility with the new flang driver.

They both set the output directory for .mod files and add the
directory to the search list. -module still only does the former.

Clean up the new driver test to match.

Differential Revision: https://reviews.llvm.org/D97164
flang/test/Driver/write-module.f90 [new file with mode: 0644]
flang/test/Flang-Driver/write-module.f90
flang/tools/f18/f18.cpp