r241485 - Support -pthread in mingw toolchain.
Yaron Keren
yaron.keren at gmail.com
Mon Jul 6 11:52:19 PDT 2015
Author: yrnkrn
Date: Mon Jul 6 13:52:19 2015
New Revision: 241485
URL: http://llvm.org/viewvc/llvm-project?rev=241485&view=rev
Log:
Support -pthread in mingw toolchain.
"-pthread" appends -lpthread after the object files list passed to the linker.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=241485&r1=241484&r2=241485&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Mon Jul 6 13:52:19 2015
@@ -8972,10 +8972,8 @@ void MinGW::Linker::ConstructJob(Compila
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)) {
More information about the cfe-commits
mailing list