Skip to content

Commit

Permalink
[flang][driver] Mark -Wl as visible in Flang
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D158309
  • Loading branch information
banach-space committed Aug 21, 2023
1 parent 73e5a70 commit 3758aed
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clang/include/clang/Driver/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions flang/test/Driver/driver-help-hidden.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions flang/test/Driver/driver-help.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
3 changes: 3 additions & 0 deletions flang/test/Driver/misc-flags.f90
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3758aed

Please sign in to comment.