[PATCH] D125957: [flang][driver] Make driver accept `-module-dir<value>`

Andrzej Warzynski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 19 04:14:32 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGf82062550374: [flang][driver] Make driver accept `-module-dir<value>` (authored by awarzynski).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125957

Files:
  clang/include/clang/Driver/Options.td
  flang/test/Driver/write-module.f90


Index: flang/test/Driver/write-module.f90
===================================================================
--- flang/test/Driver/write-module.f90
+++ flang/test/Driver/write-module.f90
@@ -4,21 +4,28 @@
 ! We use `-fsyntax-only` as it stops after the semantic checks (the module file is generated when sema checks are run)
 
 !--------------------------
-! -module-dir
+! -module-dir <value>
 !--------------------------
 ! RUN: rm -rf %t && mkdir -p %t/dir-flang
 ! RUN: cd %t && %flang -fsyntax-only -module-dir %t/dir-flang %s
 ! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod
 
+!--------------------------
+! -module-dir<value>
+!--------------------------
+! RUN: rm -rf %t && mkdir -p %t/dir-flang
+! RUN: cd %t && %flang -fsyntax-only -module-dir%t/dir-flang %s
+! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod
+
 !---------------------------
-! -J <dir> (i.e. with space)
+! -J <value>
 !---------------------------
 ! RUN: rm -rf %t && mkdir -p %t/dir-flang
 ! RUN: cd %t && %flang -fsyntax-only -J %t/dir-flang %s
 ! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod
 
 !------------------------------
-! -J<dir> (i.e. without space)
+! -J<value>
 !------------------------------
 ! RUN: rm -rf %t && mkdir -p %t/dir-flang
 ! RUN: cd %t && %flang -fsyntax-only -J%t/dir-flang %s
Index: clang/include/clang/Driver/Options.td
===================================================================
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -4776,7 +4776,7 @@
   HelpText<"Enable predefined and command line preprocessor macros">;
 def nocpp : Flag<["-"], "nocpp">, Group<f_Group>,
   HelpText<"Disable predefined and command line preprocessor macros">;
-def module_dir : Separate<["-"], "module-dir">, MetaVarName<"<dir>">,
+def module_dir : JoinedOrSeparate<["-"], "module-dir">, MetaVarName<"<dir>">,
   HelpText<"Put MODULE files in <dir>">,
   DocBrief<[{This option specifies where to put .mod files for compiled modules.
 It is also added to the list of directories to be searched by an USE statement.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125957.430642.patch
Type: text/x-patch
Size: 2110 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220519/23d9c26e/attachment.bin>


More information about the cfe-commits mailing list