[libcxx-commits] [libcxx] [llvm] [libc++] Refactor the configuration macros to being always defined (PR #112094)
Martin Storsjö via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Nov 6 06:59:05 PST 2024
mstorsjo wrote:
FWIW, that setup with `if constexpr` doesn't work, as the call to `pthread_setname_np` is invalid for these data types, even if `if constexpr` would eliminate it:
```
llvm-project/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp:249:11: error: no matching function for call to 'pthread_setname_np'
249 | (void)pthread_setname_np(thread.native_handle(), name.c_str());
| ^~~~~~~~~~~~~~~~~~
/opt/llvm-mingw/x86_64-w64-mingw32/include/pthread.h:323:26: note: candidate function not viable: cannot convert argument of incomplete type 'native_handle_type' (aka 'void *') to 'pthread_t' (aka 'unsigned long long') for 1st argument
323 | WINPTHREAD_API int pthread_setname_np(pthread_t thread, const char *name);
| ^ ~~~~~~~~~~~~~~~~
1 error generated.
```
I posted a PR to simply skip this on mingw targets, in https://github.com/llvm/llvm-project/pull/115167.
https://github.com/llvm/llvm-project/pull/112094
More information about the libcxx-commits
mailing list