Support -pthread in mingw toolchain.

"-pthread" appends -lpthread after the object files list passed to the linker.

llvm-svn: 241485
This commit is contained in:
Yaron Keren 2015-07-06 18:52:19 +00:00
parent 63d10d6767
commit adce68ee88
1 changed files with 2 additions and 4 deletions

View File

@ -8972,10 +8972,8 @@ void MinGW::Linker::ConstructJob(Compilation &C, const JobAction &JA,
if (Args.hasArg(options::OPT_pg))
CmdArgs.push_back("-lgmon");
// FIXME: what to do about pthreads library?
// Currently required for OpenMP and posix-threading libgcc,
// does not exists in mingw.org.
//CmdArgs.push_back("-lpthread");
if (Args.hasArg(options::OPT_pthread))
CmdArgs.push_back("-lpthread");
// add system libraries
if (Args.hasArg(options::OPT_mwindows)) {