cros_setup_toolchains: restrict host-post-cross packages further

If we're building from source, and we're only building for a single
board, that board might not enable all the toolchain tuples that are
required to build these host packages.  Disable the host-post-cross
target in that case.

BUG=chromium:772988
TEST=precq passes

Change-Id: Idaafee86f43374d2397782bf5dc33537bbc6b3c7
Reviewed-on: https://chromium-review.googlesource.com/707219
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
diff --git a/scripts/cros_setup_toolchains.py b/scripts/cros_setup_toolchains.py
index f3e7660..c9d85a5 100644
--- a/scripts/cros_setup_toolchains.py
+++ b/scripts/cros_setup_toolchains.py
@@ -704,8 +704,12 @@
     # Those that were not initialized may need a config update.
     Crossdev.UpdateTargets(reconfig_targets, usepkg, config_only=True)
 
-    # Since we have cross-compilers now, we can update these packages.
-    targets['host-post-cross'] = {}
+    # If we're building a subset of toolchains for a board, we might not have
+    # all the tuples that the packages expect.  We don't define the "full" set
+    # of tuples currently other than "whatever the full sdk has normally".
+    if usepkg or set(('all', 'sdk')) & targets_wanted:
+      # Since we have cross-compilers now, we can update these packages.
+      targets['host-post-cross'] = {}
 
   # We want host updated.
   targets['host'] = {}