[flang-commits] [PATCH] D110356: [flang] Make builtin types more easily accessible; use them

Andrzej Warzynski via Phabricator via flang-commits flang-commits at lists.llvm.org
Mon Sep 27 03:28:30 PDT 2021


awarzynski added inline comments.


================
Comment at: flang/tools/f18/CMakeLists.txt:34
     COMMAND flang-new -fc1 -fsyntax-only -module-dir ${FLANG_INTRINSIC_MODULES_DIR}
-      ${FLANG_SOURCE_DIR}/module/${filename}.f90
+      -J ${FLANG_INTRINSIC_MODULES_DIR} ${FLANG_SOURCE_DIR}/module/${filename}.f90
     DEPENDS flang-new ${FLANG_SOURCE_DIR}/module/${filename}.f90 ${depends}
----------------
klausler wrote:
> awarzynski wrote:
> > klausler wrote:
> > > awarzynski wrote:
> > > > In LLVM Flang, `-J` is just an alias for `-module-dir`: https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Driver/Options.td#L4589-L4592. 
> > > > 
> > > > So, `-J ${FLANG_INTRINSIC_MODULES_DIR}` is identical to `-module-dir ${FLANG_INTRINSIC_MODULES_DIR} ` and hence this change is not needed.
> > > Already removed in updated patch.  But I'm not sure that equating -J with -module-dir is the right thing to do in the Arm driver.  -J specifies a module search directory, while -module-dir specifies the single module output directory, yes?
> > In LLVM Flang, `-module-dir` (as well as `-J`) specify module search directory _and_ module output directory. The semantics are consistent with [[ https://gcc.gnu.org/onlinedocs/gfortran/Directory-Options.html | gfortran ]]. If you see different behavior then that's a bug.
> > 
> > New spelling (`-module-dir`) was suggested as a more accurate/descriptive alternative `-J`. See this [[ https://lists.llvm.org/pipermail/flang-dev/2020-November/000593.html | e-mail ]] and my reply that followed.
> So how does one specify multiple module search directories, analogous to multiple -I header file search directories?
Also with `-I`. From [[ https://gcc.gnu.org/onlinedocs/gfortran/Directory-Options.html | gfortran ]]:

> This path is also used to search for .mod files when previously compiled modules are required by a USE statement. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110356/new/

https://reviews.llvm.org/D110356



More information about the flang-commits mailing list