What is g++'s -pthread equiv in clang? What is g++'s -pthread equiv in clang? multithreading multithreading

What is g++'s -pthread equiv in clang?


clang requires -pthread when compiling but not when linking. This is annoying, but it is observed behavior:

$ clang -c x.cpp$ clang -pthread -c x.cpp$ clang -o x x.o$ clang -pthread -o x x.oclang: warning: argument unused during compilation: '-pthread'$ $ clang --versionApple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn)Target: x86_64-apple-darwin13.0.0Thread model: posix$


Clang supports -pthread. May be in the latest builds, so update it and try again.