1# Copyright 2015 The Chromium Authors 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5declare_args() { 6 # Select the desired branding flavor. False means normal Chromium branding, 7 # true means official Google Chrome branding (requires extra Google-internal 8 # resources). 9 is_chrome_branded = false 10 11 # Whether to enable the Chrome for Testing (CfT) flavor. This arg is not 12 # compatible with `is_chrome_branded`. 13 # 14 # Design document: https://goo.gle/chrome-for-testing 15 is_chrome_for_testing = false 16 17 # Whether to use internal Chrome for Testing (CfT). 18 # Requires `src-internal/` and `is_chrome_for_testing = true`. 19 # 20 # When true, use Google-internal icons, otherwise fall back to Chromium icons. 21 is_chrome_for_testing_branded = false 22 23 # Set to true to enable settings for high end Android devices, typically 24 # enhancing speed at the expense of resources such as binary sizes and memory. 25 # Non-official builds should ignore this argument so that arm64 builders 26 # remain fast and independent from PGO without having to set the value to false. 27 is_high_end_android = target_cpu == "arm64" 28 29 if (is_android) { 30 # By default, Trichrome channels are compiled using separate package names. 31 # Set this to 'true' to compile Trichrome channels using the Stable channel's 32 # package name. This currently only affects builds with `android_channel = 33 # "beta"`. 34 use_stable_package_name_for_trichrome = false 35 } 36} 37 38# Ensure !is_android implies !is_high_end_android. 39is_high_end_android = is_high_end_android && is_android 40 41declare_args() { 42 # Whether to apply size->speed trade-offs to the secondary toolchain. 43 # Relevant only for 64-bit target_cpu. 44 is_high_end_android_secondary_toolchain = is_high_end_android 45} 46 47assert(!is_chrome_for_testing || !is_chrome_branded, 48 "`is_chrome_for_testing` is incompatible with `is_chrome_branded`") 49 50assert(is_chrome_for_testing || !is_chrome_for_testing_branded, 51 "`is_chrome_for_testing_branded` requires `is_chrome_for_testing`") 52 53declare_args() { 54 # Refers to the subdirectory for branding in various places including 55 # chrome/app/theme. 56 # 57 # `branding_path_product` must not contain slashes. 58 if (is_chrome_for_testing) { 59 if (is_chrome_for_testing_branded) { 60 branding_path_component = "google_chrome/google_chrome_for_testing" 61 } else { 62 branding_path_component = "chromium" 63 } 64 branding_path_product = "chromium" 65 } else if (is_chrome_branded) { 66 branding_path_component = "google_chrome" 67 branding_path_product = "google_chrome" 68 } else { 69 branding_path_component = "chromium" 70 branding_path_product = "chromium" 71 } 72} 73 74declare_args() { 75 # The path to the BRANDING file in chrome/app/theme. 76 branding_file_path = "//chrome/app/theme/$branding_path_component/BRANDING" 77} 78