ICU redefines __has_builtin in public API
In the case several internal builtins defined by clang are not available, ICU is replacing them by a stub implementation. But that is breaking detection of availability of same builtins in parts of Chromium
(specifically we found this problem in base/location.h).
Instead of that, it would be better that ICU would create specific macros mapping to those builtins when available, or to stub implementation when they are not.
This issue was initially discussed in chromium code review but after initial discussion it was decided that it would be more convenient to propose the change directly upstream.
In the originally proposed change, I.e. for the case of __has_builtin, previous implementation was defining __has_builtin(x) as 0 in case it was not declared. With new implementation, there is a macro ICU_HAS_BUILTIN that maps to _has_builtin if available, or 0 if not. As part of the discussion, a porposal to use UPRV prefix instead of ICU was done, that also seems to make sense.
I attached the proposed patch in upstream chromium.