Page MenuHomePhabricator

[NFC] Improve triple match of scripts that update tests

Authored by dnsampaio on Jun 11 2019, 9:28 AM.



The prior behavior of the triple matcher would stop
in the first matched triple. It was not possible to
create specific matches for sub-sets of a triple
(e.g aarch64-apple-darwin would never be used after
aarch64 was matched).

This patch:

  1. Allows that specialized triples take priority,

considering that the string lenght of the triple
indentifies how specialized a triple is. If two
triples of same lenght match, the one matched first
prevails, preserving the old behavior.

  1. Remove 20 duplicated triples of arm, thumb,

aarch64 options with same arguments, matching
the common prefix (aarch64, arm, thumb) of them.

  1. Creates three new function matching regexes and

five triple options for arm64-apple-ios,
(arm|thumb)-apple-ios and thumb(v5)?-macho

Diff Detail


Event Timeline

dnsampaio created this revision.Jun 11 2019, 9:28 AM

The logic looks fine, but somebody who knows python might know a better way to do this?

MaskRay added inline comments.Jun 15 2019, 9:56 PM
322 ↗(On Diff #204087)

Single quotes to be consistent with other strings in this file.

328 ↗(On Diff #204087)

is None

dnsampaio updated this revision to Diff 205277.Jun 18 2019, 2:35 AM

Fixed inline requests

MaskRay accepted this revision.Jun 18 2019, 2:50 AM
This revision is now accepted and ready to land.Jun 18 2019, 2:50 AM
This revision was automatically updated to reflect the committed changes.