Lines Matching full:targets
407 // module, then searches through the Targets to determine which have enabled Targets for this
423 for _, t := range ctx.Config().Targets[os] {
564 // "both": compile for all Targets supported by the OsClass (generally x86_64 and x86, or arm64 and…
569 // "common": compile a for a single Target that will work on all Targets supported by the OsClass (…
571 // Once the list of Targets is determined, the module is split into a variant for each Target.
574 // but will have a common Target that is expected to handle all other selected Targets via ctx.Mult…
578 Targets map[string]Target member
600 osTargets := ctx.Config().Targets[os]
603 // Filter NativeBridge targets unless they are explicitly supported.
611 // Filter HostCross targets if disabled.
629 // Convert the multilib selection into a list of Targets.
630 targets, err := decodeMultilibTargets(multilib, osTargets, prefer32)
635 // If there are no supported targets disable the module.
636 if len(targets) == 0 {
642 // a separate list of Targets.
649 multiTargets = filterHostCross(multiTargets, targets[0].HostCross)
656 targets = filterToArch(targets, primaryArch, Common)
660 // If there are no supported targets disable the module.
661 if len(targets) == 0 {
666 // Convert the targets into a list of arch variation names.
667 targetNames := make([]string, len(targets))
668 targetMapping := make(map[string]Target, len(targets))
669 for i, target := range targets {
671 targetMapping[targetNames[i]] = targets[i]
675 Targets: targetMapping,
733 target, ok := allArchInfo.Targets[variation]
753 isUniversalBinary := allArchInfo.Multilib == "darwin_universal" && len(allArchInfo.Targets) == 2
755 hasSecondaryConfigured := len(ctx.Config().Targets[Darwin]) > 1
757 secondaryArch := ctx.Config().Targets[Darwin][1].Arch.String()
766 // of additional Targets it is supporting (if any), and whether it is the primary Target for
800 // If a device is configured with multiple targets, this option
801 // force all device targets that prefer32 to be compiled only as
835 // filterToArch takes a list of Targets and an ArchType, and returns a modified list that contains
836 // only Targets that have the specified ArchTypes.
837 func filterToArch(targets []Target, archs ...ArchType) []Target {
838 for i := 0; i < len(targets); i++ {
841 if targets[i].Arch.ArchType == arch {
847 targets = append(targets[:i], targets[i+1:]...)
851 return targets
854 // filterHostCross takes a list of Targets and a hostCross value, and returns a modified list
855 // that contains only Targets that have the specified HostCross.
856 func filterHostCross(targets []Target, hostCross bool) []Target {
857 for i := 0; i < len(targets); i++ {
858 if targets[i].HostCross != hostCross {
859 targets = append(targets[:i], targets[i+1:]...)
863 return targets
966 // Start with a list of the special targets
967 targets := []string{
983 targets = append(targets, os.Field)
987 targets = append(targets, GetCompoundTargetField(os, archType))
993 if !InList(target, targets) {
994 targets = append(targets, target)
999 if !InList(target, targets) {
1000 targets = append(targets, target)
1005 if !InList(target, targets) {
1006 targets = append(targets, target)
1011 if !InList(target, targets) {
1012 targets = append(targets, target)
1017 if !InList(target, targets) {
1018 targets = append(targets, target)
1025 targetType := reflect.StructOf(variantFields(targets))
1301 // options for all targets on a device that supports 64-bit binaries, not just the targets
1499 hasArmAndroidArch(ctx.Config().Targets[Android])) {
1507 hasArmAndroidArch(ctx.Config().Targets[Android])) {
1550 // determineBuildOS stores the OS and architecture used for host targets used during the build into
1578 // Convert the arch product variables into a list of targets for each OsType.
1582 targets := make(map[OsType][]Target)
1644 targets[target.os] = append(targets[target.os],
1667 // Optional cross-compiled host targets, generally Windows.
1687 // Optional device targets
1745 return targets, nil
1753 // hasArmAndroidArch returns true if targets has at least
1755 func hasArmAndroidArch(targets []Target) bool {
1756 for _, target := range targets {
1795 // decodeArchSettings converts a list of archConfigs into a list of Targets for the given OsType.
1870 // filterMultilibTargets takes a list of Targets and a multilib value and returns a new list of
1871 // Targets containing only those that have the given multilib value.
1872 func filterMultilibTargets(targets []Target, multilib string) []Target {
1874 for _, t := range targets {
1882 // getCommonTargets returns the set of Os specific common architecture targets for each Os in a list
1883 // of targets.
1884 func getCommonTargets(targets []Target) []Target {
1888 for _, t := range targets {
1900 // FirstTarget takes a list of Targets and a list of multilib values and returns a list of Targets
1903 func FirstTarget(targets []Target, filters ...string) []Target {
1913 buildTargets := filterMultilibTargets(targets, filter)
1925 // decodeMultilibTargets uses the module's multilib setting to select one or more targets from a
1926 // list of Targets.
1927 func decodeMultilibTargets(multilib string, targets []Target, prefer32 bool) ([]Target, error) {
1932 buildTargets = getCommonTargets(targets)
1935 buildTargets = append(buildTargets, filterMultilibTargets(targets, "lib32")...)
1936 buildTargets = append(buildTargets, filterMultilibTargets(targets, "lib64")...)
1938 buildTargets = append(buildTargets, filterMultilibTargets(targets, "lib64")...)
1939 buildTargets = append(buildTargets, filterMultilibTargets(targets, "lib32")...)
1942 buildTargets = filterMultilibTargets(targets, "lib32")
1944 buildTargets = filterMultilibTargets(targets, "lib64")
1947 buildTargets = FirstTarget(targets, "lib32", "lib64")
1949 buildTargets = FirstTarget(targets, "lib64", "lib32")
1952 buildTargets = FirstTarget(targets, "lib32", "lib64")
1954 buildTargets = filterMultilibTargets(targets, "lib32")
1956 buildTargets = filterMultilibTargets(targets, "lib64")
1959 buildTargets = filterMultilibTargets(targets, "lib64")
1960 // Reverse the targets so that the first architecture can depend on the second