1 # Copyright 2018 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.
5 import("//build/buildflag_header.gni")
6 import("//build/config/chrome_build.gni")
7 import("//build/config/chromecast_build.gni")
8 import("//build/config/chromeos/args.gni")
9 import("//build/config/chromeos/ui_mode.gni")
10 import("//build/config/features.gni")
11 import("//build/util/process_version.gni")
12 import("//build_overrides/build.gni")
14 source_set("buildflag_header_h") {
15 sources = [ "buildflag.h" ]
18 buildflag_header("branding_buildflags") {
19 header = "branding_buildflags.h"
21 if (is_chrome_branded) {
23 "CHROMIUM_BRANDING=0",
24 "GOOGLE_CHROME_BRANDING=1",
28 "CHROMIUM_BRANDING=1",
29 "GOOGLE_CHROME_BRANDING=0",
33 if (is_chrome_for_testing) {
34 assert(!is_chrome_branded,
35 "`is_chrome_for_testing` is incompatible with `is_chrome_branded`")
37 flags += [ "CHROME_FOR_TESTING=1" ]
39 flags += [ "CHROME_FOR_TESTING=0" ]
42 # Note: `GOOGLE_CHROME_FOR_TESTING_BRANDING` and `CHROMIUM_BRANDING` are not
44 if (is_chrome_for_testing_branded) {
45 assert(is_chrome_for_testing,
46 "`is_chrome_for_testing_branded` requires `is_chrome_for_testing`")
48 flags += [ "GOOGLE_CHROME_FOR_TESTING_BRANDING=1" ]
50 flags += [ "GOOGLE_CHROME_FOR_TESTING_BRANDING=0" ]
54 buildflag_header("blink_buildflags") {
55 header = "blink_buildflags.h"
56 flags = [ "USE_BLINK=$use_blink" ]
59 buildflag_header("chromecast_buildflags") {
60 header = "chromecast_buildflags.h"
63 "IS_CASTOS=$is_castos",
64 "IS_CAST_ANDROID=$is_cast_android",
65 "ENABLE_CAST_RECEIVER=$enable_cast_receiver",
69 buildflag_header("chromeos_buildflags") {
70 header = "chromeos_buildflags.h"
73 "IS_CHROMEOS_DEVICE=$is_chromeos_device",
75 "IS_CHROMEOS_LACROS=$is_chromeos_lacros",
76 "IS_CHROMEOS_ASH=$is_chromeos_ash",
77 "IS_CHROMEOS_WITH_HW_DETAILS=$is_chromeos_with_hw_details",
82 buildflag_header("robolectric_buildflags") {
83 header = "robolectric_buildflags.h"
84 flags = [ "IS_ROBOLECTRIC=$is_robolectric" ]
87 if (build_with_chromium) {
88 group("gold_common_pytype") {
91 data = [ "//build/skia_gold_common/" ]
93 data_deps = [ "//testing:pytype_dependencies" ]
98 process_version("version_metadata") {
99 sources = [ "//chrome/VERSION" ]
101 template_file = "metadata.json.in"
102 output = "$root_out_dir/metadata.json"