Skip to content

Commit c5aefbe

Browse files
committed
Restore -Xlinker for clang-cl
1 parent dd72deb commit c5aefbe

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,7 @@ def z : Separate<["-"], "z">, Flags<[LinkerInput]>,
10551055
def offload_link : Flag<["--"], "offload-link">, Group<Link_Group>,
10561056
HelpText<"Use the new offloading linker to perform the link job.">;
10571057
def Xlinker : Separate<["-"], "Xlinker">, Flags<[LinkerInput, RenderAsInput]>,
1058-
Visibility<[ClangOption, FlangOption]>,
1058+
Visibility<[ClangOption, CLOption, FlangOption]>,
10591059
HelpText<"Pass <arg> to the linker">, MetaVarName<"<arg>">,
10601060
Group<Link_Group>;
10611061
def Xoffload_linker : JoinedAndSeparate<["-"], "Xoffload-linker">,

clang/test/Driver/unknown-arg-drivermodes.test

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// RUN: -shared \
1010
// RUN: -static \
1111
// RUN: -stdlib \
12-
// RUN: -Xlinker \
1312
// RUN: -Xoffload-linker \
1413
// RUN: -### -x c++ -c - < /dev/null 2>&1 | FileCheck %s --check-prefix=CL
1514

@@ -38,7 +37,6 @@
3837
// CL: warning: unknown argument ignored in clang-cl: '-shared'
3938
// CL: warning: unknown argument ignored in clang-cl: '-static'
4039
// CL: warning: unknown argument ignored in clang-cl: '-stdlib'
41-
// CL: warning: unknown argument ignored in clang-cl: '-Xlinker'
4240
// CL: warning: unknown argument ignored in clang-cl: '-Xoffload-linker'
4341

4442
// DXC: error: unknown argument: '--config'

0 commit comments

Comments
 (0)