]> granicus.if.org Git - clang/commitdiff
Teach clang that -no-pthread is a valid command line option
authorYaron Keren <yaron.keren@gmail.com>
Fri, 10 Jul 2015 18:42:13 +0000 (18:42 +0000)
committerYaron Keren <yaron.keren@gmail.com>
Fri, 10 Jul 2015 18:42:13 +0000 (18:42 +0000)
The winpthreads library in mingw-w64 passes -no-pthread when building
since pthreads is not available to build itself and pthreads it is linked
by default. clang does not link to pthreads by default but did error on
unknown -no-pthread option thus stopping the winpthreads build.

http://reviews.llvm.org/D11087

Patch by Martell Malone.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241929 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/Options.td

index a67f8d7cfda2a1242e1a885fa2b1958ad5928d13..ff51e5dd5fdb5607064e0db92c3586561c12f8b2 100644 (file)
@@ -1541,6 +1541,7 @@ def private__bundle : Flag<["-"], "private_bundle">;
 def pthreads : Flag<["-"], "pthreads">;
 def pthread : Flag<["-"], "pthread">, Flags<[CC1Option]>,
   HelpText<"Support POSIX threads in generated code">;
+def no_pthread : Flag<["-"], "no-pthread">, Flags<[CC1Option]>;
 def p : Flag<["-"], "p">;
 def pie : Flag<["-"], "pie">;
 def read__only__relocs : Separate<["-"], "read_only_relocs">;