Commit 1d6b0d0c authored by Ben Pastene's avatar Ben Pastene Committed by Commit Bot

Replace use of --board with --boards in Simple Chrome gclient hook.

This will let folks check out multiple board SDKs at once without
having to modify their .gclient file each time.

Needs to land after crrev.com/c/2163589.

Bug: 937821
Change-Id: I191985b4d5044c84009b8a7d05e33785b6e81e37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2163849Reviewed-by: default avatarTakuto Ikuta <tikuta@chromium.org>
Reviewed-by: default avatarErik Chen <erikchen@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/master@{#763367}
parent d5183c78
...@@ -143,12 +143,12 @@ vars = { ...@@ -143,12 +143,12 @@ vars = {
# Default to the empty board. Desktop Chrome OS builds don't need cros SDK # Default to the empty board. Desktop Chrome OS builds don't need cros SDK
# dependencies. Other Chrome OS builds should always define this explicitly. # dependencies. Other Chrome OS builds should always define this explicitly.
'cros_board': '', 'cros_boards': '',
# Building for CrOS is only supported on linux currently. # Building for CrOS is only supported on linux currently.
'checkout_simplechrome': '(checkout_chromeos and host_os == "linux") and ("{cros_board}" != "")', 'checkout_simplechrome': '(checkout_chromeos and host_os == "linux") and ("{cros_boards}" != "")',
# Surround the board var in quotes so gclient doesn't try parsing the string # Surround the board var in quotes so gclient doesn't try parsing the string
# as an expression. # as an expression.
'cros_download_vm': '(("{cros_board}" == "amd64-generic") or ("{cros_board}" == "betty")) or ("{cros_board}" == "betty-pi-arc")', 'cros_download_vm': '(("{cros_boards}" == "amd64-generic") or ("{cros_boards}" == "betty")) or ("{cros_boards}" == "betty-pi-arc")',
# Should we build and test for public (ie: full) CrOS images, or private # Should we build and test for public (ie: full) CrOS images, or private
# (ie: release) images. # (ie: release) images.
'use_public_cros_config': 'not checkout_src_internal', 'use_public_cros_config': 'not checkout_src_internal',
...@@ -4337,7 +4337,7 @@ hooks = [ ...@@ -4337,7 +4337,7 @@ hooks = [
'--fallback-versions=10', '--fallback-versions=10',
'--nogn-gen', '--nogn-gen',
'--download-vm', '--download-vm',
'--board={cros_board}', '--boards={cros_boards}',
'--cache-dir=src/build/cros_cache/', '--cache-dir=src/build/cros_cache/',
# TODO(crbug.com/834134): Remove the cache clobber when the sdk is smart # TODO(crbug.com/834134): Remove the cache clobber when the sdk is smart
# enough to eject old toolchains from the cache. # enough to eject old toolchains from the cache.
...@@ -4357,7 +4357,7 @@ hooks = [ ...@@ -4357,7 +4357,7 @@ hooks = [
'--use-external-config', '--use-external-config',
'--fallback-versions=10', '--fallback-versions=10',
'--nogn-gen', '--nogn-gen',
'--board={cros_board}', '--boards={cros_boards}',
'--cache-dir=src/build/cros_cache/', '--cache-dir=src/build/cros_cache/',
'--log-level=error', '--log-level=error',
'--no-shell', '--no-shell',
......
...@@ -4,7 +4,8 @@ Files in this directory are populated by running `gclient sync` with specific ...@@ -4,7 +4,8 @@ Files in this directory are populated by running `gclient sync` with specific
arguments set in the .gclient file. Specifically: arguments set in the .gclient file. Specifically:
* The file must have a top-level variable set: `target_os = ["chromeos"]` * The file must have a top-level variable set: `target_os = ["chromeos"]`
* The `"custom_vars"` parameter of the chromium/src.git solution must include the * The `"custom_vars"` parameter of the chromium/src.git solution must include the
parameter: `"cros_board": "{BOARD_NAME}"` parameter: `"cros_boards": "{BOARD_NAMES}"` where `{BOARD_NAMES}` is a
colon-separated list of boards you'd like to checkout.
A typical .gclient file is a sibling of the src/ directory, and might look like A typical .gclient file is a sibling of the src/ directory, and might look like
this: this:
...@@ -17,7 +18,7 @@ solutions = [ ...@@ -17,7 +18,7 @@ solutions = [
"custom_deps": {}, "custom_deps": {},
"custom_vars" : { "custom_vars" : {
"checkout_src_internal": True, "checkout_src_internal": True,
"cros_board": "eve", "cros_boards": "eve",
}, },
}, },
] ]
...@@ -41,5 +42,5 @@ use_goma = true ...@@ -41,5 +42,5 @@ use_goma = true
goma_dir = "/path/to/goma/" goma_dir = "/path/to/goma/"
``` ```
TODO(bpastene): Add list support to gclient and allow multiple boards to be TODO(bpastene): Make 'cros_boards' a first class citizen in gclient and replace
specified in the .gclient file. it with 'target_boards' instead.
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