atanasyan added a comment. Now I'm not sure that we really need to make this code more complicated. As to the `stdthreadbug` test case, maybe we can just exclude this test if LDFLAGS contains the `-static` option.
As to this patch, is it possible to implement the following algorithm? Will it be more easy and clear? 1. if there is no `-pthread` or `-pthreads` flag, do nothing. 2. if the flag provided, iterate over `-l` options (do not introduce new `lpthread` first-class argument). If there is the `-lpthread` (with or without `whole-archive` surrounds), consider a user know what he/she wants to do. 3. if there is no `-lpthread`, pass `--whole-archive -lpthread --no-whole-archive` to the linker. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56836/new/ https://reviews.llvm.org/D56836 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits