From df64ee138a74e530e17f14ec67408d790b162e5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Hajdan=2C=20Jr?= Date: Tue, 26 Sep 2017 09:32:14 +0200 Subject: [PATCH] gclient: expose target_os MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: 570091 Change-Id: I7513f3360662975ef6ef1d9019726dcef730a586 Reviewed-on: https://chromium-review.googlesource.com/681700 Commit-Queue: Paweł Hajdan Jr. Reviewed-by: Dirk Pranke --- gclient.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gclient.py b/gclient.py index dbccb4d3e..14c88917f 100755 --- a/gclient.py +++ b/gclient.py @@ -1152,6 +1152,12 @@ class Dependency(gclient_utils.WorkItem, DependencySettings): (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.