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

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: 's avatarDirk Pranke <dpranke@chromium.org>
parent 81e3ff52
......@@ -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.
......
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