[libcxx-commits] [libcxx] [libc++][RFC] Always define internal feature test macros (PR #89178)
Jordan Rupprecht via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Apr 18 11:06:11 PDT 2024
rupprecht wrote:
What kinds of adjustments downstream do you expect this will require?
Maybe it's just something historical, but I see some `-D_LIBCPP_HAS_NO_<x>` usage. Does this PR mean we should use `-D_LIBCPP_HAS_NO_FOO -D_LIBCPP_HAS_FOO=0` as a way to be compatible before & after this change?
OTOH, it seems suspicious that we're setting these in the first place. If the conditions in `__config` lead to libc++ defining `#define _LIBCPP_HAS_FOO 1` but we have `-D_LIBCPP_HAS_FOO=0` as a build flag, that would break due to macro redefinition w/ a different value, right? Are there any conditions here where it would make sense for `__config` to only define it if not already defined?
One common option I see being set is `_LIBCPP_HAS_NO_THREADS`, but that isn't being changed here. Did you miss that one, or is intentional that only a subset of the `HAS_NO` vars are being changed?
+1 to this patch being an improvement, especially with the removal of double-negative as mentioned.
https://github.com/llvm/llvm-project/pull/89178
More information about the libcxx-commits
mailing list