-
Notifications
You must be signed in to change notification settings - Fork 3
/
BUILD.bazel
111 lines (91 loc) · 2.3 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
load("@rules_cc//cc:defs.bzl", "cc_library")
load("//:utils.bzl", "bool_flag_config", "define_feature")
load("//repositories:pkg_config/pkg_config.bzl", "pkg_config_test_suite")
package(default_visibility = [":__subpackages__"])
bool_flag_config(
name = "apm",
build_setting_default = False,
)
bool_flag_config(
name = "hw_dependency",
build_setting_default = False,
)
bool_flag_config(
name = "ml",
build_setting_default = False,
)
bool_flag_config(
name = "selinux",
build_setting_default = False,
)
bool_flag_config(
name = "metrics",
build_setting_default = False,
)
bool_flag_config(
name = "hats",
build_setting_default = False,
)
bool_flag_config(
name = "dlc",
build_setting_default = False,
)
bool_flag_config(
name = "featured",
build_setting_default = False,
)
bool_flag_config(
name = "chromeos",
build_setting_default = False,
)
bool_flag_config(
name = "fuzzer",
build_setting_default = False,
)
bool_flag_config(
name = "system_cras_rust",
build_setting_default = False,
)
# Whether to use percetto from the system.
# If False, a stubbed version will be used.
bool_flag_config(
name = "system_percetto",
build_setting_default = False,
)
bool_flag_config(
name = "ucm2_files",
build_setting_default = True,
)
config_setting(
name = "x86_64_build",
constraint_values = [
"@platforms//cpu:x86_64",
],
)
cc_library(
name = "build_config",
defines = define_feature("//:selinux_build", "CRAS_SELINUX") +
define_feature("//:apm_build", "HAVE_WEBRTC_APM") +
define_feature("//:metrics_build", "HAVE_LIB_METRICS") +
define_feature("//:hats_build", "HAVE_HATS") +
define_feature("//:fuzzer_build", "HAVE_FUZZER"),
target_compatible_with = select({
":incompatible_selinux_fuzzer_build": ["@platforms//:incompatible"],
"//conditions:default": [],
}),
)
config_setting(
name = "incompatible_selinux_fuzzer_build",
flag_values = {
":fuzzer": "true",
":selinux": "true",
},
)
alias(
name = "compdb",
actual = "@compdb",
)
pkg_config_test_suite()