This patch set is not actually particulalry new, I have been maintaining it locally one Darwin branches and it has been tested on several versions of Darwin both with and without Alex's __has_{feature, extension} patch.
This is one of the three most significant blockers to importing the macOS SDKs properly, and cannot currently be fixincludes-ed (in fact it can not ever really since the attribute is uaer-facing and so can be in end-user code that we cannot fix). OK for trunk? thanks Iain