Author: Andrzej Warzynski Date: 2023-08-21T07:06:11Z New Revision: 3758aed31a512d9219bd31174a300c34d1af9fda
URL: https://github.com/llvm/llvm-project/commit/3758aed31a512d9219bd31174a300c34d1af9fda DIFF: https://github.com/llvm/llvm-project/commit/3758aed31a512d9219bd31174a300c34d1af9fda.diff LOG: [flang][driver] Mark -Wl as visible in Flang Differential Revision: https://reviews.llvm.org/D158309 Added: Modified: clang/include/clang/Driver/Options.td flang/test/Driver/driver-help-hidden.f90 flang/test/Driver/driver-help.f90 flang/test/Driver/misc-flags.f90 Removed: ################################################################################ diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 19a2abf494363c..d668faf650a721 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -912,7 +912,8 @@ def Wdeprecated : Flag<["-"], "Wdeprecated">, Group<W_Group>, HelpText<"Enable warnings for deprecated constructs and define __DEPRECATED">; def Wno_deprecated : Flag<["-"], "Wno-deprecated">, Group<W_Group>, Visibility<[ClangOption, CC1Option]>; -def Wl_COMMA : CommaJoined<["-"], "Wl,">, Flags<[LinkerInput, RenderAsInput]>, +def Wl_COMMA : CommaJoined<["-"], "Wl,">, Visibility<[ClangOption, FlangOption]>, + Flags<[LinkerInput, RenderAsInput]>, HelpText<"Pass the comma separated arguments in <arg> to the linker">, MetaVarName<"<arg>">, Group<Link_Group>; // FIXME: This is broken; these should not be Joined arguments. diff --git a/flang/test/Driver/driver-help-hidden.f90 b/flang/test/Driver/driver-help-hidden.f90 index 1842fc7b03c103..80708a7cfafe4b 100644 --- a/flang/test/Driver/driver-help-hidden.f90 +++ b/flang/test/Driver/driver-help-hidden.f90 @@ -132,6 +132,7 @@ ! CHECK-NEXT: -U <macro> Undefine macro <macro> ! CHECK-NEXT: --version Print version information ! CHECK-NEXT: -v Show commands to run and use verbose output +! CHECK-NEXT: -Wl,<arg> Pass the comma separated arguments in <arg> to the linker ! CHECK-NEXT: -W<warning> Enable the specified warning ! CHECK-NEXT: -Xflang <arg> Pass <arg> to the flang compiler ! CHECK-NEXT: -x <language> Treat subsequent input files as having type <language> diff --git a/flang/test/Driver/driver-help.f90 b/flang/test/Driver/driver-help.f90 index 85d707e35f1f58..7e7d127188093f 100644 --- a/flang/test/Driver/driver-help.f90 +++ b/flang/test/Driver/driver-help.f90 @@ -120,6 +120,7 @@ ! HELP-NEXT: -U <macro> Undefine macro <macro> ! HELP-NEXT: --version Print version information ! HELP-NEXT: -v Show commands to run and use verbose output +! HELP-NEXT: -Wl,<arg> Pass the comma separated arguments in <arg> to the linker ! HELP-NEXT: -W<warning> Enable the specified warning ! HELP-NEXT: -Xflang <arg> Pass <arg> to the flang compiler ! HELP-NEXT: -x <language> Treat subsequent input files as having type <language> diff --git a/flang/test/Driver/misc-flags.f90 b/flang/test/Driver/misc-flags.f90 index 74df9f7785ba17..0c367b90b0b6c7 100644 --- a/flang/test/Driver/misc-flags.f90 +++ b/flang/test/Driver/misc-flags.f90 @@ -1,6 +1,9 @@ ! Make sure that `-l` is "visible" to Flang's driver ! RUN: %flang -lpgmath -### %s +! Make sure that `-Wl` is "visible" to Flang's driver +! RUN: %flang -Wl,abs -### %s + program hello write(*,*), "Hello world!" end program hello _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits