Commit d325eb34 authored by Paweł Hajdan, Jr's avatar Paweł Hajdan, Jr Committed by Commit Bot

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/698066Reviewed-by: 's avatarMichael Moss <mmoss@chromium.org>
Reviewed-by: 's avatarAaron Gable <agable@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
parent c634ba57
...@@ -1160,13 +1160,13 @@ class Dependency(gclient_utils.WorkItem, DependencySettings): ...@@ -1160,13 +1160,13 @@ 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_android': 'android' in self.target_os,
'checkout_fuchsia': repr('fuchsia' in self.target_os), 'checkout_fuchsia': 'fuchsia' in self.target_os,
'checkout_ios': repr('ios' in self.target_os), 'checkout_ios': 'ios' in self.target_os,
'checkout_linux': repr('unix' in self.target_os), 'checkout_linux': 'unix' in self.target_os,
'checkout_mac': repr('mac' in self.target_os), 'checkout_mac': 'mac' in self.target_os,
'checkout_win': repr('win' in self.target_os), 'checkout_win': 'win' in self.target_os,
'host_os': repr(_detect_host_os()), 'host_os': _detect_host_os(),
} }
# Variables defined in DEPS file override built-in ones. # Variables defined in DEPS file override built-in ones.
result.update(self._vars) result.update(self._vars)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment