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>
changes/00/681700/3
Paweł Hajdan, Jr 8 years ago committed by Commit Bot
parent 81e3ff5242
commit df64ee138a

@ -1152,6 +1152,12 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
(DEPS file contents with applied custom_vars overrides).""" (DEPS file contents with applied custom_vars overrides)."""
# Provide some built-in variables. # Provide some built-in variables.
result = { 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()), 'host_os': repr(_detect_host_os()),
} }
# Variables defined in DEPS file override built-in ones. # Variables defined in DEPS file override built-in ones.

Loading…
Cancel
Save