Page MenuHomePhabricator

[BinaryFormat] Teach identify_magic about Tapi files.
AbandonedPublic

Authored by ributzka on Sep 13 2017, 12:03 PM.

Details

Summary

Tapi files are YAML files that start with the !tapi tag. The only execption are
TBD v1 files, which don't have a tag. In that case we have to scan a little
further and check if the first key "archs" exists.

This is the first patch in a series of patches to add libObject support for
text-based dynamic library (.tbd) files.

Event Timeline

ributzka created this revision.Sep 13 2017, 12:03 PM
ributzka set the repository for this revision to rL LLVM.Sep 13 2017, 12:03 PM
vsk edited edge metadata.Sep 13 2017, 12:09 PM

LGTM, but it'd be good to get a second +1 from someone more familiar with libObject internals.

lhames edited edge metadata.Sep 13 2017, 1:18 PM

LGTM so far, but I'd like to see the follow up patches to see where it's going. :)

Bigcheese edited edge metadata.Oct 30 2017, 6:45 PM

Is the intent for TAPI files to be a subset of YAML? This only detects one very specific way of starting a YAML file.

Other than that this looks fine.

compnerd accepted this revision.Oct 31 2018, 12:34 PM

Unfortunately, the TAPI releases are in the wild, so we need to support the old files. It would be nice to have some sort of marker on the file (similar to a shebang) to indicate that it is a TAPI file.

This revision is now accepted and ready to land.Oct 31 2018, 12:34 PM

We do have that now. All TAPI files start now with "--- !tapi". It is only
that the first version doesn't have that marker and that is why we have to
fall back to this extra check.

davide added a subscriber: davide.Nov 27 2018, 3:07 PM
ributzka abandoned this revision.Wed, Aug 14, 9:56 AM

New version is tracked here: D66149

Herald added a project: Restricted Project. · View Herald TranscriptWed, Aug 14, 9:56 AM