Skip to content

Commit 3758aed

Browse files
committed
[flang][driver] Mark -Wl as visible in Flang
Differential Revision: https://reviews.llvm.org/D158309
1 parent 73e5a70 commit 3758aed

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,8 @@ def Wdeprecated : Flag<["-"], "Wdeprecated">, Group<W_Group>,
912912
HelpText<"Enable warnings for deprecated constructs and define __DEPRECATED">;
913913
def Wno_deprecated : Flag<["-"], "Wno-deprecated">, Group<W_Group>,
914914
Visibility<[ClangOption, CC1Option]>;
915-
def Wl_COMMA : CommaJoined<["-"], "Wl,">, Flags<[LinkerInput, RenderAsInput]>,
915+
def Wl_COMMA : CommaJoined<["-"], "Wl,">, Visibility<[ClangOption, FlangOption]>,
916+
Flags<[LinkerInput, RenderAsInput]>,
916917
HelpText<"Pass the comma separated arguments in <arg> to the linker">,
917918
MetaVarName<"<arg>">, Group<Link_Group>;
918919
// FIXME: This is broken; these should not be Joined arguments.

flang/test/Driver/driver-help-hidden.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
! CHECK-NEXT: -U <macro> Undefine macro <macro>
133133
! CHECK-NEXT: --version Print version information
134134
! CHECK-NEXT: -v Show commands to run and use verbose output
135+
! CHECK-NEXT: -Wl,<arg> Pass the comma separated arguments in <arg> to the linker
135136
! CHECK-NEXT: -W<warning> Enable the specified warning
136137
! CHECK-NEXT: -Xflang <arg> Pass <arg> to the flang compiler
137138
! CHECK-NEXT: -x <language> Treat subsequent input files as having type <language>

flang/test/Driver/driver-help.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@
120120
! HELP-NEXT: -U <macro> Undefine macro <macro>
121121
! HELP-NEXT: --version Print version information
122122
! HELP-NEXT: -v Show commands to run and use verbose output
123+
! HELP-NEXT: -Wl,<arg> Pass the comma separated arguments in <arg> to the linker
123124
! HELP-NEXT: -W<warning> Enable the specified warning
124125
! HELP-NEXT: -Xflang <arg> Pass <arg> to the flang compiler
125126
! HELP-NEXT: -x <language> Treat subsequent input files as having type <language>

flang/test/Driver/misc-flags.f90

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
! Make sure that `-l` is "visible" to Flang's driver
22
! RUN: %flang -lpgmath -### %s
33

4+
! Make sure that `-Wl` is "visible" to Flang's driver
5+
! RUN: %flang -Wl,abs -### %s
6+
47
program hello
58
write(*,*), "Hello world!"
69
end program hello

0 commit comments

Comments
 (0)