Skip to content

Commit

Permalink
[Android] Add enable_chrome_android_internal GN flag
Browse files Browse the repository at this point in the history
This flag will allow devs having access to the internal Chrome for
Android repo to choose whether to use it in their builds.

BUG=702323

Review-Url: https://codereview.chromium.org/2753273002
Cr-Commit-Position: refs/heads/master@{#457749}
  • Loading branch information
dgn authored and Commit bot committed Mar 17, 2017
1 parent 10292d3 commit d1e190d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ group("gn_all") {
]
}

if (has_chrome_android_internal) {
if (enable_chrome_android_internal) {
deps += [ "//clank" ]
}
}
Expand Down
14 changes: 13 additions & 1 deletion build/config/android/config.gni
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,19 @@ if (is_android) {
[ rebase_path("//clank", root_build_dir) ],
"string") == "True"

if (has_chrome_android_internal) {
# We are using a separate declare_args block for only this argument so that
# we can decide if we have to pull in definitions from the internal config
# early.
declare_args() {
# Enables using the internal Chrome for Android repository. The default
# value depends on whether the repository is available, and if it's not but
# this argument is manually set to True, the generation will fail.
# The main purpose of this argument is to avoid having to maintain 2
# repositories to support both public only and internal builds.
enable_chrome_android_internal = has_chrome_android_internal
}

if (enable_chrome_android_internal) {
import("//clank/config.gni")
}

Expand Down

0 comments on commit d1e190d

Please sign in to comment.