blob: 3c5a0b8a9f5f16cd53ada7c76df43d259ae16d42 [file] [log] [blame]
Pigd7660f12020-10-15 02:58:37 +08001// Omni soong configs
2
Simon Shields8a283642017-08-23 12:03:36 +10003bootstrap_go_package {
Rashed Abdel-Tawabe3f7fc92019-09-05 21:24:07 -07004 name: "soong-omnirom-generator",
5 pkgPath: "omnirom/soong/generator",
Rashed Abdel-Tawab2735c4a2019-09-05 21:21:13 -07006 deps: [
7 "blueprint",
8 "blueprint-pathtools",
9 "soong",
10 "soong-android",
11 "soong-shared",
12 ],
13 srcs: [
14 "generator/generator.go",
15 "generator/variables.go",
16 ],
17 pluginFor: ["soong_build"],
18}
19
Rashed Abdel-Tawabe3f7fc92019-09-05 21:24:07 -070020omni_generator {
Rashed Abdel-Tawab2735c4a2019-09-05 21:21:13 -070021 name: "generated_kernel_includes",
22
23 // The headers make command
Marko Manef692442019-10-08 13:27:09 +020024 cmd: "$(KERNEL_MAKE_CMD) $(KERNEL_MAKE_FLAGS) -C $(TARGET_KERNEL_SOURCE) O=$(KERNEL_BUILD_OUT_PREFIX)$(genDir) ARCH=$(KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) headers_install",
Rashed Abdel-Tawab2735c4a2019-09-05 21:21:13 -070025
26 // Directories that can be imported by a cc_* module generated_headers property
27 export_include_dirs: ["usr/include", "usr/techpack/audio/include"],
28
29 // Sources for dependency tracking
30 dep_root: "$(TARGET_KERNEL_SOURCE)",
31 dep_files: [ "Makefile", "include/**/*", "arch/$(KERNEL_ARCH)/include/**/*", "techpack/audio/include/**/*"],
32}
33
34cc_library_headers {
35 name: "generated_kernel_headers",
36 generated_headers: ["generated_kernel_includes"],
37 export_generated_headers: ["generated_kernel_includes"],
38 vendor_available: true,
LuK1337587a7f72019-09-09 21:58:19 +020039 recovery_available: true,
Rashed Abdel-Tawab2735c4a2019-09-05 21:21:13 -070040}
Pigd7660f12020-10-15 02:58:37 +080041
42soong_config_module_type {
43 name: "vendor_init",
44 module_type: "cc_defaults",
45 config_namespace: "omniGlobalVars",
46 value_variables: ["target_init_vendor_lib"],
47 bool_variables: ["target_create_device_symlinks"],
48 properties: [
49 "cflags",
50 "whole_static_libs",
51 ],
52}
53
54vendor_init {
55 name: "vendor_init_defaults",
56 soong_config_variables: {
57 target_init_vendor_lib: {
58 whole_static_libs: ["%s"],
59 },
60 target_create_device_symlinks: {
61 cflags: ["-DTARGET_CREATE_DEVICE_SYMLINKS"],
62 },
63 },
64}
65
66soong_config_module_type {
TheScarastic1dacedb2022-01-17 16:22:51 +010067 name: "surfaceflinger_udfps_lib",
Pigd7660f12020-10-15 02:58:37 +080068 module_type: "cc_defaults",
69 config_namespace: "omniGlobalVars",
TheScarastic1dacedb2022-01-17 16:22:51 +010070 value_variables: ["target_surfaceflinger_udfps_lib"],
Pigd7660f12020-10-15 02:58:37 +080071 properties: [
72 "cppflags",
73 "whole_static_libs",
74 ],
75}
76
TheScarastic1dacedb2022-01-17 16:22:51 +010077surfaceflinger_udfps_lib {
78 name: "surfaceflinger_udfps_lib_defaults",
Pigd7660f12020-10-15 02:58:37 +080079 soong_config_variables: {
TheScarastic1dacedb2022-01-17 16:22:51 +010080 target_surfaceflinger_udfps_lib: {
81 cppflags: ["-DTARGET_PROVIDES_UDFPS_LIB"],
Pigd7660f12020-10-15 02:58:37 +080082 whole_static_libs: ["%s"],
83 },
84 },
85}
86
87soong_config_module_type {
88 name: "use_sdclang",
89 module_type: "cc_defaults",
90 config_namespace: "omniGlobalVars",
91 bool_variables: ["target_use_sdclang"],
92 properties: [
93 "cppflags",
94 ],
95}
96
97use_sdclang {
98 name: "use_sdclang_defaults",
99 soong_config_variables: {
100 target_use_sdclang: {
101 cppflags: ["-DTARGET_USE_SDCLANG"],
102 },
103 },
104}
105
106soong_config_module_type {
107 name: "camera_client_info",
108 module_type: "cc_defaults",
109 config_namespace: "omniGlobalVars",
110 bool_variables: ["target_camera_needs_client_info"],
111 properties: [
112 "cppflags",
113 ],
114}
115
116camera_client_info {
117 name: "camera_client_info_defaults",
118 soong_config_variables: {
119 target_camera_needs_client_info: {
120 cppflags: ["-DTARGET_CAMERA_NEEDS_CLIENT_INFO"],
121 },
122 },
123}
124
125soong_config_module_type {
126 name: "enforce_ab_ota_partition_list",
127 module_type: "cc_defaults",
128 config_namespace: "omniGlobalVars",
129 bool_variables: ["target_enforce_ab_ota_partition_list"],
130 properties: [
131 "cppflags",
132 ],
133}
134
135enforce_ab_ota_partition_list {
136 name: "enforce_ab_ota_partition_list_defaults",
137 soong_config_variables: {
138 target_enforce_ab_ota_partition_list: {
139 cppflags: ["-DTARGET_ENFORCE_AB_OTA_PARTITION_LIST"],
140 },
141 },
142}
143
144soong_config_module_type {
145 name: "enable_op_fastchg",
146 module_type: "cc_defaults",
147 config_namespace: "omniGlobalVars",
148 bool_variables: ["healthd_enable_op_fastchg"],
149 properties: ["cflags"],
150}
151
152enable_op_fastchg {
153 name: "enable_op_fastchg_defaults",
154 soong_config_variables: {
155 healthd_enable_op_fastchg: {
156 cflags: ["-DHEALTHD_ENABLE_OP_FASTCHG_CHECK"],
157 },
158 },
159}
160
161soong_config_module_type {
162 name: "use_battery_info",
163 module_type: "cc_defaults",
164 config_namespace: "omniGlobalVars",
165 bool_variables: ["healthd_use_battery_info"],
166 properties: ["cflags"],
167}
168
169use_battery_info {
170 name: "use_battery_info_defaults",
171 soong_config_variables: {
172 healthd_use_battery_info: {
173 cflags: ["-DHEALTHD_USE_BATTERY_INFO"],
174 },
175 },
176}
177
178soong_config_module_type {
179 name: "needsHWCOnFirstRef",
180 module_type: "cc_defaults",
181 config_namespace: "omniGlobalVars",
182 bool_variables: ["targetNeedsHWCOnFirstRef"],
183 properties: ["cppflags"],
184}
185
186needsHWCOnFirstRef {
187 name: "needsHWCOnFirstRef_defaults",
188 soong_config_variables: {
189 targetNeedsHWCOnFirstRef: {
190 cppflags: ["-DTARGET_NEEDS_HWC_ONFIRSTREF"],
191 },
192 },
193}
194
Chirayu Desai49f1ac92022-09-17 04:47:54 +0530195soong_config_module_type {
196 name: "gralloc_handle_reserved_size",
197 module_type: "cc_defaults",
198 config_namespace: "omniGlobalVars",
199 bool_variables: ["gralloc_handle_has_reserved_size"],
200 properties: ["cflags"],
201}
202
203gralloc_handle_reserved_size {
204 name: "gralloc_handle_has_reserved_size_defaults",
205 soong_config_variables: {
206 gralloc_handle_has_reserved_size: {
207 cflags: ["-DGRALLOC_HANDLE_HAS_RESERVED_SIZE"],
208 },
209 },
210}
211
Pigd7660f12020-10-15 02:58:37 +0800212// QCOM specific config modules
213soong_config_module_type {
214 name: "metadata_fde_key",
215 module_type: "cc_defaults",
216 config_namespace: "omniQcomVars",
217 bool_variables: ["uses_metadata_as_fde_key"],
218 properties: [
219 "cppflags",
220 ],
221}
222
223metadata_fde_key {
224 name: "metadata_fde_key_defaults",
225 soong_config_variables: {
226 uses_metadata_as_fde_key: {
227 cppflags: ["-DTARGET_USES_METADATA_AS_FDE_KEY"],
228 },
229 },
230}
231
232soong_config_module_type {
233 name: "enable_tricolor_led",
234 module_type: "cc_defaults",
235 config_namespace: "omniQcomVars",
236 bool_variables: ["healthd_enable_tricolor_led"],
237 properties: ["cflags"],
238}
239
240enable_tricolor_led {
241 name: "enable_tricolor_led_defaults",
242 soong_config_variables: {
243 healthd_enable_tricolor_led: {
244 cflags: ["-DHEALTHD_ENABLE_TRICOLOR_LED"],
245 },
246 },
247}
248
249soong_config_module_type {
250 name: "vold_hw_fde",
251 module_type: "cc_defaults",
252 config_namespace: "omniQcomVars",
253 bool_variables: ["supports_hw_fde"],
254 properties: [
255 "cflags",
256 "header_libs",
257 "shared_libs",
258 ],
259}
260
261vold_hw_fde {
262 name: "vold_hw_fde_defaults",
263 soong_config_variables: {
264 supports_hw_fde: {
265 cflags: ["-DCONFIG_HW_DISK_ENCRYPTION"],
266 header_libs: ["libcryptfs_hw_headers"],
267 shared_libs: ["libcryptfs_hw"],
268 },
269 },
270}
271
272soong_config_module_type {
273 name: "vold_hw_fde_perf",
274 module_type: "cc_defaults",
275 config_namespace: "omniQcomVars",
276 bool_variables: ["supports_hw_fde_perf"],
277 properties: [
278 "cflags",
279 "shared_libs",
280 ],
281}
282
283vold_hw_fde_perf {
284 name: "vold_hw_fde_perf_defaults",
285 soong_config_variables: {
286 supports_hw_fde_perf: {
287 cflags: ["-DCONFIG_HW_DISK_ENCRYPT_PERF"],
288 shared_libs: ["libcryptfs_hw"],
289 },
290 },
291}