gclient: expose target_os

Bug: 570091
Change-Id: I7513f3360662975ef6ef1d9019726dcef730a586
Reviewed-on: https://chromium-review.googlesource.com/681700
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
diff --git a/gclient.py b/gclient.py
index dbccb4d..14c8891 100755
--- a/gclient.py
+++ b/gclient.py
@@ -1152,6 +1152,12 @@
     (DEPS file contents with applied custom_vars overrides)."""
     # Provide some built-in variables.
     result = {
+        'checkout_android': repr('android' in self.target_os),
+        'checkout_fuchsia': repr('fuchsia' in self.target_os),
+        'checkout_ios': repr('ios' in self.target_os),
+        'checkout_linux': repr('unix' in self.target_os),
+        'checkout_mac': repr('mac' in self.target_os),
+        'checkout_win': repr('win' in self.target_os),
         'host_os': repr(_detect_host_os()),
     }
     # Variables defined in DEPS file override built-in ones.