gclient: make predefined variables native

See https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/687496

Bug: 570091
Change-Id: Ifb2c8473e1b1e8ae0c73365bc806a995ddbd7b74
Reviewed-on: https://chromium-review.googlesource.com/698066
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
changes/66/698066/2
Paweł Hajdan, Jr 8 years ago committed by Commit Bot
parent c634ba5705
commit d325eb3496

@ -1160,13 +1160,13 @@ 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()),
'checkout_android': 'android' in self.target_os,
'checkout_fuchsia': 'fuchsia' in self.target_os,
'checkout_ios': 'ios' in self.target_os,
'checkout_linux': 'unix' in self.target_os,
'checkout_mac': 'mac' in self.target_os,
'checkout_win': 'win' in self.target_os,
'host_os': _detect_host_os(),
}
# Variables defined in DEPS file override built-in ones.
result.update(self._vars)

Loading…
Cancel
Save