--- absl/base/config.h 2026-06-02 02:50:32.000000000 +0800 +++ absl/base/config.h 2026-06-29 16:54:43.000000000 +0800 @@ -235,7 +235,7 @@ // compiled against libstdc++ with _GLIBCXX_HAVE_TLS defined. #ifdef ABSL_HAVE_TLS #error ABSL_HAVE_TLS cannot be directly set -#elif (defined(__linux__)) && (defined(__clang__) || defined(_GLIBCXX_HAVE_TLS)) +#elif defined(__clang__) || defined(_GLIBCXX_HAVE_TLS) #define ABSL_HAVE_TLS 1 #elif defined(__INTEL_LLVM_COMPILER) #define ABSL_HAVE_TLS 1 @@ -425,6 +425,7 @@ // explicitly deprecated and will cause build failures if enabled for those // platforms. We side-step the issue by not defining it here for Apple // platforms. +// TODO: review correctness of the above. #ifdef ABSL_HAVE_SEMAPHORE_H #error ABSL_HAVE_SEMAPHORE_H cannot be directly set #elif defined(__linux__) || defined(__ros__) || defined(__VXWORKS__) @@ -507,7 +508,8 @@ // and // https://github.com/llvm/llvm-project/commit/0bc451e7e137c4ccadcd3377250874f641ca514a // The second has the actually correct versions, thus, is what we copy here. -#if defined(__APPLE__) && \ +// Note, this only holds for libc++. +#if defined(__APPLE__) && defined(_LIBCPP_VERSION) && \ ((defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101300) || \ (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && \