This is an archive of the discontinued LLVM Phabricator instance.

[clang][modules] Don't hard code [no_undeclared_includes] for the Darwin module
ClosedPublic

Authored by iana on Aug 30 2022, 1:11 PM.

Details

Summary

The Darwin module has specified [no_undeclared_includes] for at least five years now, there's no need to hard code it in the compiler.

Diff Detail

Event Timeline

iana created this revision.Aug 30 2022, 1:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 30 2022, 1:11 PM
iana requested review of this revision.Aug 30 2022, 1:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 30 2022, 1:11 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
ributzka accepted this revision.Aug 30 2022, 1:14 PM

Seems straightforward. LGTM.

This revision is now accepted and ready to land.Aug 30 2022, 1:14 PM
Bigcheese accepted this revision.Aug 30 2022, 1:14 PM

I'm fine with this change, but do we actually have a backwards compatibility policy anywhere in Clang? Would be good to know what range of SDKs a compiler release is expected to support.

iana added a comment.Aug 30 2022, 1:40 PM

I'm fine with this change, but do we actually have a backwards compatibility policy anywhere in Clang? Would be good to know what range of SDKs a compiler release is expected to support.

I don't know about backwards compatibility, but I found the Darwin module added the attribute in 2017 macOS 10.13/iOS 11.0. As far as I can tell from the original change, adding the attribute didn't actually fix anything, it was just used to detect cycles between libc++ and Darwin, so I think removing the hard code wouldn't even break older OSes.