[clang] 6cfbfb4 - [flang][driver] Add `-l` to the list of "visble" flags

Andrzej Warzynski via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 18 06:49:10 PDT 2023


Author: Andrzej Warzynski
Date: 2023-08-18T13:48:23Z
New Revision: 6cfbfb44cb8c140b1b74a3288ed32808bbc066d3

URL: https://github.com/llvm/llvm-project/commit/6cfbfb44cb8c140b1b74a3288ed32808bbc066d3
DIFF: https://github.com/llvm/llvm-project/commit/6cfbfb44cb8c140b1b74a3288ed32808bbc066d3.diff

LOG: [flang][driver] Add `-l` to the list of "visble" flags

Missed in https://reviews.llvm.org/D157837.

Fixes:
  * https://lab.llvm.org/buildbot/#/builders/197/builds/8996/steps/13/logs/stdio

Added: 
    flang/test/Driver/misc-flags.f90

Modified: 
    clang/include/clang/Driver/Options.td

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index acdb206c18d128..f7c9bb854eb740 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -4132,7 +4132,7 @@ def imultilib : Separate<["-"], "imultilib">, Group<gfortran_Group>;
 def K : Flag<["-"], "K">, Flags<[LinkerInput]>;
 def keep__private__externs : Flag<["-"], "keep_private_externs">;
 def l : JoinedOrSeparate<["-"], "l">, Flags<[LinkerInput, RenderJoined]>,
-        Group<Link_Group>;
+        Visibility<[ClangOption, FlangOption]>, Group<Link_Group>;
 def lazy__framework : Separate<["-"], "lazy_framework">, Flags<[LinkerInput]>;
 def lazy__library : Separate<["-"], "lazy_library">, Flags<[LinkerInput]>;
 def mlittle_endian : Flag<["-"], "mlittle-endian">, Group<m_Group>,

diff  --git a/flang/test/Driver/misc-flags.f90 b/flang/test/Driver/misc-flags.f90
new file mode 100644
index 00000000000000..74df9f7785ba17
--- /dev/null
+++ b/flang/test/Driver/misc-flags.f90
@@ -0,0 +1,6 @@
+! Make sure that `-l` is "visible" to Flang's driver
+! RUN: %flang -lpgmath -### %s
+
+program hello
+  write(*,*), "Hello world!"
+end program hello


        


More information about the cfe-commits mailing list