forked from OSchip/llvm-project
Pass -dll to link.exe when building with -shared (PR22697)
And start building a test for non-clang-cl link.exe invocations. llvm-svn: 231312
This commit is contained in:
parent
b844b1a0ff
commit
e4c47f2e8b
|
@ -8098,7 +8098,9 @@ void visualstudio::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
if (Args.hasArg(options::OPT_g_Group))
|
||||
CmdArgs.push_back("-debug");
|
||||
|
||||
bool DLL = Args.hasArg(options::OPT__SLASH_LD, options::OPT__SLASH_LDd);
|
||||
bool DLL = Args.hasArg(options::OPT__SLASH_LD,
|
||||
options::OPT__SLASH_LDd,
|
||||
options::OPT_shared);
|
||||
if (DLL) {
|
||||
CmdArgs.push_back(Args.MakeArgString("-dll"));
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
// RUN: %clang -target i686-pc-windows-msvc -### %s 2>&1 | FileCheck --check-prefix=BASIC %s
|
||||
// BASIC: "link.exe"
|
||||
// BASIC: "-out:a.exe"
|
||||
// BASIC: "-defaultlib:libcmt"
|
||||
// BASIC: "-nologo"
|
||||
|
||||
// RUN: %clang -target i686-pc-windows-msvc -shared -o a.dll -### %s 2>&1 | FileCheck --check-prefix=DLL %s
|
||||
// DLL: "link.exe"
|
||||
// DLL: "-out:a.dll"
|
||||
// DLL: "-defaultlib:libcmt"
|
||||
// DLL: "-nologo"
|
||||
// DLL: "-dll"
|
Loading…
Reference in New Issue