@@ -29,11 +29,48 @@ type MatchComparer interface {
2929// Only returns a match comparer for a single platform
3030// using default resolution logic for the platform.
3131//
32+ // For ARMv8, will also match ARMv7, ARMv6 and ARMv5 (for 32bit runtimes)
3233// For ARMv7, will also match ARMv6 and ARMv5
3334// For ARMv6, will also match ARMv5
3435func Only (platform specs.Platform ) MatchComparer {
3536 platform = Normalize (platform )
3637 if platform .Architecture == "arm" {
38+ if platform .Variant == "v8" {
39+ return orderedPlatformComparer {
40+ matchers : []Matcher {
41+ & matcher {
42+ Platform : platform ,
43+ },
44+ & matcher {
45+ Platform : specs.Platform {
46+ Architecture : platform .Architecture ,
47+ OS : platform .OS ,
48+ OSVersion : platform .OSVersion ,
49+ OSFeatures : platform .OSFeatures ,
50+ Variant : "v7" ,
51+ },
52+ },
53+ & matcher {
54+ Platform : specs.Platform {
55+ Architecture : platform .Architecture ,
56+ OS : platform .OS ,
57+ OSVersion : platform .OSVersion ,
58+ OSFeatures : platform .OSFeatures ,
59+ Variant : "v6" ,
60+ },
61+ },
62+ & matcher {
63+ Platform : specs.Platform {
64+ Architecture : platform .Architecture ,
65+ OS : platform .OS ,
66+ OSVersion : platform .OSVersion ,
67+ OSFeatures : platform .OSFeatures ,
68+ Variant : "v5" ,
69+ },
70+ },
71+ },
72+ }
73+ }
3774 if platform .Variant == "v7" {
3875 return orderedPlatformComparer {
3976 matchers : []Matcher {
0 commit comments