Revert "Make FirstTarget treat HostCross separately from Host"
This reverts commit c5d7ad6b68
.
Reason for revert: Speculatively reverting as likely cause of mac build breakage
Change-Id: I30fbbaaac28f3a2fe8bc1c05775d3de248199b29
This commit is contained in:
@@ -1843,23 +1843,20 @@ func getCommonTargets(targets []Target) []Target {
|
||||
}
|
||||
|
||||
// FirstTarget takes a list of Targets and a list of multilib values and returns a list of Targets
|
||||
// that contains zero or one Target for each OsType and HostCross, selecting the one that matches
|
||||
// the earliest filter.
|
||||
// that contains zero or one Target for each OsType, selecting the one that matches the earliest
|
||||
// filter.
|
||||
func FirstTarget(targets []Target, filters ...string) []Target {
|
||||
// find the first target from each OS
|
||||
var ret []Target
|
||||
type osHostCross struct {
|
||||
os OsType
|
||||
hostCross bool
|
||||
}
|
||||
set := make(map[osHostCross]bool)
|
||||
hasHost := false
|
||||
set := make(map[OsType]bool)
|
||||
|
||||
for _, filter := range filters {
|
||||
buildTargets := filterMultilibTargets(targets, filter)
|
||||
for _, t := range buildTargets {
|
||||
key := osHostCross{t.Os, t.HostCross}
|
||||
if _, found := set[key]; !found {
|
||||
set[key] = true
|
||||
if _, found := set[t.Os]; !found {
|
||||
hasHost = hasHost || (t.Os.Class == Host)
|
||||
set[t.Os] = true
|
||||
ret = append(ret, t)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user