llvm-project/flang/test/Flang-Driver/write-module.f90
Arnamoy Bhattacharyya 985a42fdf8 [flang][driver] Add support for -J/-module-dir
Add support for option -J/-module-dir in the new Flang driver.  This
will allow for including module files in other directories, as the
default search path is currently the working folder. This also provides
an option of storing the output module in the specified folder.

Differential Revision: https://reviews.llvm.org/D95448
2021-02-04 16:31:40 +00:00

11 lines
384 B
Fortran

! RUN: mkdir -p %t/dir-f18 && %f18 -fparse-only -I tools/flang/include/flang -module %t/dir-f18 %s 2>&1
! RUN: ls %t/dir-f18/testmodule.mod && not ls %t/testmodule.mod
! RUN: mkdir -p %t/dir-flang-new && %flang-new -fsyntax-only -module-dir %t/dir-flang-new %s 2>&1
! RUN: ls %t/dir-flang-new/testmodule.mod && not ls %t/testmodule.mod
module testmodule
type::t2
end type
end