krytarowski added a comment. I was wrong about `-pthread` here, as we pass it directly to a linker. ld(1) accepts `-lpthread` not `-pthread`. cc(1) requires `-pthread` as it defines additional flags like `_REENTRANT` (OS-specific). https://reviews.llvm.org/D43378