Page MenuHomePhabricator

Move SafeMachO from Utility to Host

Authored by labath on Aug 7 2018, 5:56 AM.



One of the conclusions of the discussion on D49740 was that SafeMachO is better
off in the Host module (as that's the only place which should include
mach/machine.h, which is what this header is working around). Also, Utility,
which is the only module which cannot include Host, should not be doing
anything with object file formats.

This patch implements that move, and also removes any unneded includes of that

I've verified that MacOS still compiles after this.

Diff Detail


Event Timeline

labath created this revision.Aug 7 2018, 5:56 AM
teemperor requested changes to this revision.Sep 4 2018, 3:49 AM

Please add the header also to the modulemap in Host (which has to be manually written, as the Host module contains a lot of OS-specific headers):
module SafeMachO { header "Host/SafeMachO.h" export * }

This revision now requires changes to proceed.Sep 4 2018, 3:49 AM
labath updated this revision to Diff 165058.Sep 12 2018, 4:13 AM

Add the file to module map.

teemperor accepted this revision.Sep 12 2018, 4:15 AM

LGTM, thanks!

This revision is now accepted and ready to land.Sep 12 2018, 4:15 AM
This revision was automatically updated to reflect the committed changes.