Support GN configuration of enable_rlz (see issue #3404)

This commit is contained in:
Marshall Greenblatt 2022-10-04 12:52:48 -04:00
parent e0c878df5f
commit 497e0d2d98
2 changed files with 20 additions and 0 deletions

View File

@ -608,5 +608,10 @@ patches = [
# chrome/browser/devtools/protocol/page_handler.cc.
# https://bugs.chromium.org/p/chromium/issues/detail?id=1366011
'name': 'chrome_browser_devtools_1366011'
},
{
# Support GN configuration of enable_rlz (see issue #3404).
# https://chromium-review.googlesource.com/c/chromium/src/+/3934411
'name': 'rlz_3934411'
}
]

View File

@ -0,0 +1,15 @@
diff --git rlz/buildflags/buildflags.gni rlz/buildflags/buildflags.gni
index 8090796ea3ec7..acfc599577296 100644
--- rlz/buildflags/buildflags.gni
+++ rlz/buildflags/buildflags.gni
@@ -9,4 +9,9 @@ import("//build/config/chromeos/ui_mode.gni")
# rlz codes for searches but do not use the library.
enable_rlz_support = is_win || is_apple || is_chromeos_ash
-enable_rlz = is_chrome_branded && enable_rlz_support
+declare_args() {
+ enable_rlz = is_chrome_branded && enable_rlz_support
+}
+
+assert(!enable_rlz || enable_rlz_support,
+ "RLZ is only supported on Windows, Apple and ChromeOS Ash.")