Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 1 | // Bliss soong configs |
| 2 | |
Simon Shields | 4ed4605 | 2017-08-23 12:03:36 +1000 | [diff] [blame] | 3 | bootstrap_go_package { |
Jackeagle | d6811aa | 2019-09-24 08:26:40 +0200 | [diff] [blame] | 4 | name: "soong-bliss-generator", |
| 5 | pkgPath: "bliss/soong/generator", |
Sam Mortimer | 80381b7 | 2018-09-18 15:56:14 -0700 | [diff] [blame] | 6 | deps: [ |
| 7 | "blueprint", |
| 8 | "blueprint-pathtools", |
| 9 | "soong", |
| 10 | "soong-android", |
| 11 | "soong-shared", |
| 12 | ], |
| 13 | srcs: [ |
| 14 | "generator/generator.go", |
Rashed Abdel-Tawab | 9fa7e80 | 2018-09-18 21:53:24 -0700 | [diff] [blame] | 15 | "generator/variables.go", |
Sam Mortimer | 80381b7 | 2018-09-18 15:56:14 -0700 | [diff] [blame] | 16 | ], |
| 17 | pluginFor: ["soong_build"], |
| 18 | } |
Rashed Abdel-Tawab | 9fa7e80 | 2018-09-18 21:53:24 -0700 | [diff] [blame] | 19 | |
Jackeagle | d6811aa | 2019-09-24 08:26:40 +0200 | [diff] [blame] | 20 | bliss_generator { |
Rashed Abdel-Tawab | 9fa7e80 | 2018-09-18 21:53:24 -0700 | [diff] [blame] | 21 | name: "generated_kernel_includes", |
| 22 | |
| 23 | // The headers make command |
Rashed Abdel-Tawab | ba5ea35 | 2019-09-07 17:01:13 -0700 | [diff] [blame] | 24 | cmd: "$(PATH_OVERRIDE_SOONG) $(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-Tawab | 9fa7e80 | 2018-09-18 21:53:24 -0700 | [diff] [blame] | 25 | |
| 26 | // Directories that can be imported by a cc_* module generated_headers property |
dianlujitao | 9dfd5f7 | 2020-03-03 17:26:32 +0800 | [diff] [blame] | 27 | export_include_dirs: [ |
dianlujitao | 83d2fa4 | 2020-06-28 22:16:44 +0800 | [diff] [blame] | 28 | "usr/audio/include/uapi", |
dianlujitao | 9dfd5f7 | 2020-03-03 17:26:32 +0800 | [diff] [blame] | 29 | "usr/include", |
| 30 | "usr/include/audio/include/uapi", |
Pig | f6e0a85 | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 31 | "usr/techpack/audio/include", |
dianlujitao | 9dfd5f7 | 2020-03-03 17:26:32 +0800 | [diff] [blame] | 32 | ], |
Rashed Abdel-Tawab | 9fa7e80 | 2018-09-18 21:53:24 -0700 | [diff] [blame] | 33 | |
| 34 | // Sources for dependency tracking |
| 35 | dep_root: "$(TARGET_KERNEL_SOURCE)", |
Pig | f6e0a85 | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 36 | dep_files: [ |
| 37 | "Makefile", |
| 38 | "include/**/*", |
| 39 | "arch/$(KERNEL_ARCH)/include/**/*", |
| 40 | "techpack/audio/include/**/*", |
| 41 | ], |
Rashed Abdel-Tawab | 9fa7e80 | 2018-09-18 21:53:24 -0700 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | cc_library_headers { |
| 45 | name: "generated_kernel_headers", |
| 46 | generated_headers: ["generated_kernel_includes"], |
| 47 | export_generated_headers: ["generated_kernel_includes"], |
| 48 | vendor_available: true, |
LuK1337 | 43442c2 | 2019-09-09 21:58:19 +0200 | [diff] [blame] | 49 | recovery_available: true, |
Rashed Abdel-Tawab | 9fa7e80 | 2018-09-18 21:53:24 -0700 | [diff] [blame] | 50 | } |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 51 | |
| 52 | // Target platform agnostic config modules |
| 53 | soong_config_module_type { |
LuK1337 | eb28eac | 2023-06-24 21:03:23 -0500 | [diff] [blame] | 54 | name: "aapt_version_code", |
| 55 | module_type: "java_defaults", |
| 56 | config_namespace: "blissGlobalVars", |
| 57 | value_variables: ["aapt_version_code"], |
| 58 | properties: ["aaptflags"], |
| 59 | } |
| 60 | |
| 61 | aapt_version_code { |
| 62 | name: "aapt_version_code_defaults", |
| 63 | soong_config_variables: { |
| 64 | aapt_version_code: { |
| 65 | aaptflags: [ |
| 66 | "--version-code", |
| 67 | "%s", |
| 68 | ], |
| 69 | }, |
| 70 | }, |
| 71 | } |
| 72 | |
| 73 | soong_config_module_type { |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 74 | name: "gralloc_10_usage_bits", |
| 75 | module_type: "cc_defaults", |
| 76 | config_namespace: "blissGlobalVars", |
| 77 | value_variables: ["additional_gralloc_10_usage_bits"], |
| 78 | properties: ["cppflags"], |
| 79 | } |
| 80 | |
| 81 | gralloc_10_usage_bits { |
| 82 | name: "gralloc_10_usage_bits_defaults", |
| 83 | soong_config_variables: { |
| 84 | additional_gralloc_10_usage_bits: { |
| 85 | cppflags: ["-DADDNL_GRALLOC_10_USAGE_BITS=%s"], |
| 86 | }, |
| 87 | }, |
| 88 | } |
| 89 | |
| 90 | soong_config_module_type { |
Chirayu Desai | 981d210 | 2022-09-17 04:47:54 +0530 | [diff] [blame] | 91 | name: "gralloc_handle_reserved_size", |
| 92 | module_type: "cc_defaults", |
| 93 | config_namespace: "blissGlobalVars", |
| 94 | bool_variables: ["gralloc_handle_has_reserved_size"], |
| 95 | properties: ["export_cflags"], |
| 96 | } |
| 97 | |
| 98 | gralloc_handle_reserved_size { |
| 99 | name: "gralloc_handle_has_reserved_size_defaults", |
| 100 | soong_config_variables: { |
| 101 | gralloc_handle_has_reserved_size: { |
| 102 | export_cflags: ["-DGRALLOC_HANDLE_HAS_RESERVED_SIZE"], |
| 103 | }, |
| 104 | }, |
| 105 | } |
| 106 | |
| 107 | soong_config_module_type { |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 108 | name: "target_shim_libs", |
| 109 | module_type: "cc_defaults", |
| 110 | config_namespace: "blissGlobalVars", |
| 111 | value_variables: ["target_ld_shim_libs"], |
| 112 | properties: ["cppflags"], |
| 113 | } |
| 114 | |
| 115 | target_shim_libs { |
| 116 | name: "shim_libs_defaults", |
| 117 | soong_config_variables: { |
| 118 | target_ld_shim_libs: { |
| 119 | cppflags: ["-DLD_SHIM_LIBS=\"%s\""], |
| 120 | }, |
| 121 | }, |
| 122 | } |
| 123 | |
| 124 | soong_config_module_type { |
| 125 | name: "vendor_init", |
| 126 | module_type: "cc_defaults", |
| 127 | config_namespace: "blissGlobalVars", |
| 128 | value_variables: ["target_init_vendor_lib"], |
| 129 | properties: ["whole_static_libs"], |
| 130 | } |
| 131 | |
| 132 | vendor_init { |
| 133 | name: "vendor_init_defaults", |
| 134 | soong_config_variables: { |
| 135 | target_init_vendor_lib: { |
| 136 | whole_static_libs: ["%s"], |
| 137 | }, |
| 138 | }, |
| 139 | } |
| 140 | |
| 141 | soong_config_module_type { |
TheScarastic | 8541a94 | 2021-10-19 08:07:54 +0000 | [diff] [blame] | 142 | name: "surfaceflinger_udfps_lib", |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 143 | module_type: "cc_defaults", |
| 144 | config_namespace: "blissGlobalVars", |
TheScarastic | 8541a94 | 2021-10-19 08:07:54 +0000 | [diff] [blame] | 145 | value_variables: ["target_surfaceflinger_udfps_lib"], |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 146 | properties: [ |
| 147 | "cppflags", |
| 148 | "whole_static_libs", |
| 149 | ], |
| 150 | } |
| 151 | |
TheScarastic | 8541a94 | 2021-10-19 08:07:54 +0000 | [diff] [blame] | 152 | surfaceflinger_udfps_lib { |
| 153 | name: "surfaceflinger_udfps_lib_defaults", |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 154 | soong_config_variables: { |
TheScarastic | 8541a94 | 2021-10-19 08:07:54 +0000 | [diff] [blame] | 155 | target_surfaceflinger_udfps_lib: { |
| 156 | cppflags: ["-DTARGET_PROVIDES_UDFPS_LIB"], |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 157 | whole_static_libs: ["%s"], |
| 158 | }, |
| 159 | }, |
| 160 | } |
| 161 | |
| 162 | soong_config_module_type { |
Sebastiano Barezzi | d881fbd | 2023-06-25 17:05:50 -0500 | [diff] [blame] | 163 | name: "needs_camera_boottime", |
| 164 | module_type: "cc_defaults", |
| 165 | config_namespace: "blissGlobalVars", |
| 166 | bool_variables: ["needs_camera_boottime"], |
| 167 | properties: ["cppflags"], |
| 168 | } |
| 169 | |
| 170 | needs_camera_boottime { |
| 171 | name: "needs_camera_boottime_defaults", |
| 172 | soong_config_variables: { |
| 173 | needs_camera_boottime: { |
| 174 | cppflags: ["-DTARGET_CAMERA_BOOTTIME_TIMESTAMP"], |
| 175 | }, |
| 176 | }, |
| 177 | } |
| 178 | |
| 179 | soong_config_module_type { |
Lup Gabriel | 09fc685 | 2021-06-06 18:24:41 +0900 | [diff] [blame] | 180 | name: "camera_needs_client_info", |
Marko Man | 25a4ca4 | 2021-08-06 22:26:43 -0500 | [diff] [blame] | 181 | module_type: "cc_defaults", |
| 182 | config_namespace: "blissGlobalVars", |
Lup Gabriel | 09fc685 | 2021-06-06 18:24:41 +0900 | [diff] [blame] | 183 | bool_variables: ["camera_needs_client_info"], |
Marko Man | 25a4ca4 | 2021-08-06 22:26:43 -0500 | [diff] [blame] | 184 | properties: ["cppflags"], |
| 185 | } |
| 186 | |
Lup Gabriel | 09fc685 | 2021-06-06 18:24:41 +0900 | [diff] [blame] | 187 | camera_needs_client_info { |
| 188 | name: "camera_needs_client_info_defaults", |
Marko Man | 25a4ca4 | 2021-08-06 22:26:43 -0500 | [diff] [blame] | 189 | soong_config_variables: { |
Lup Gabriel | 09fc685 | 2021-06-06 18:24:41 +0900 | [diff] [blame] | 190 | camera_needs_client_info: { |
| 191 | cppflags: ["-DCAMERA_NEEDS_CLIENT_INFO"], |
Marko Man | 25a4ca4 | 2021-08-06 22:26:43 -0500 | [diff] [blame] | 192 | }, |
| 193 | }, |
| 194 | } |
| 195 | |
| 196 | soong_config_module_type { |
Hikari-no-Tenshi | 1de1c91 | 2023-06-25 17:10:37 -0500 | [diff] [blame] | 197 | name: "camera_needs_client_info_lib", |
| 198 | module_type: "cc_defaults", |
| 199 | config_namespace: "blissGlobalVars", |
| 200 | bool_variables: ["camera_needs_client_info_lib"], |
| 201 | properties: [ |
| 202 | "cppflags", |
| 203 | "shared_libs", |
| 204 | ], |
| 205 | } |
| 206 | |
| 207 | camera_needs_client_info_lib { |
| 208 | name: "camera_needs_client_info_lib_defaults", |
| 209 | soong_config_variables: { |
| 210 | camera_needs_client_info_lib: { |
| 211 | cppflags: ["-DCAMERA_NEEDS_CLIENT_INFO_LIB"], |
| 212 | shared_libs: ["//hardware/oneplus:vendor.oneplus.hardware.camera@1.0"], |
| 213 | }, |
| 214 | }, |
| 215 | } |
| 216 | |
| 217 | soong_config_module_type { |
ShevT | 8ad2744 | 2023-06-25 17:17:24 -0500 | [diff] [blame^] | 218 | name: "camera_needs_client_info_lib_oplus", |
| 219 | module_type: "cc_defaults", |
| 220 | config_namespace: "blissGlobalVars", |
| 221 | bool_variables: ["camera_needs_client_info_lib_oplus"], |
| 222 | properties: [ |
| 223 | "cppflags", |
| 224 | "shared_libs", |
| 225 | ], |
| 226 | } |
| 227 | |
| 228 | camera_needs_client_info_lib_oplus { |
| 229 | name: "camera_needs_client_info_lib_oplus_defaults", |
| 230 | soong_config_variables: { |
| 231 | camera_needs_client_info_lib_oplus: { |
| 232 | cppflags: ["-DCAMERA_NEEDS_CLIENT_INFO_LIB_OPLUS"], |
| 233 | shared_libs: ["vendor.oplus.hardware.cameraMDM@2.0"], |
| 234 | }, |
| 235 | }, |
| 236 | } |
| 237 | |
| 238 | soong_config_module_type { |
Danny Trunk | bcd7220 | 2022-03-23 22:28:02 +0100 | [diff] [blame] | 239 | name: "egl_display_array", |
| 240 | module_type: "cc_defaults", |
| 241 | config_namespace: "blissGlobalVars", |
| 242 | bool_variables: ["uses_egl_display_array"], |
| 243 | properties: ["cflags"], |
| 244 | } |
| 245 | |
| 246 | egl_display_array { |
| 247 | name: "egl_display_array_defaults", |
| 248 | soong_config_variables: { |
| 249 | uses_egl_display_array: { |
| 250 | cflags: ["-DEGL_DISPLAY_ARRAY"], |
| 251 | }, |
| 252 | }, |
| 253 | } |
| 254 | |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 255 | // NVIDIA specific config modules |
| 256 | soong_config_module_type { |
| 257 | name: "nvidia_enhancements", |
| 258 | module_type: "cc_defaults", |
| 259 | config_namespace: "blissNvidiaVars", |
| 260 | bool_variables: ["uses_nvidia_enhancements"], |
| 261 | properties: ["cppflags"], |
| 262 | } |
| 263 | |
| 264 | nvidia_enhancements { |
| 265 | name: "nvidia_enhancements_defaults", |
| 266 | soong_config_variables: { |
| 267 | uses_nvidia_enhancements: { |
| 268 | cppflags: ["-DNV_ANDROID_FRAMEWORK_ENHANCEMENTS"], |
| 269 | }, |
| 270 | }, |
| 271 | } |
| 272 | |
| 273 | // QCOM specific config modules |
| 274 | soong_config_module_type { |
| 275 | name: "librmnetctl_pre_uplink", |
| 276 | module_type: "cc_defaults", |
| 277 | config_namespace: "blissQcomVars", |
| 278 | bool_variables: ["uses_pre_uplink_features_netmgrd"], |
| 279 | properties: ["cflags"], |
| 280 | } |
| 281 | |
| 282 | librmnetctl_pre_uplink { |
| 283 | name: "librmnetctl_pre_uplink_defaults", |
| 284 | soong_config_variables: { |
| 285 | uses_pre_uplink_features_netmgrd: { |
| 286 | cflags: ["-DNO_UPLINK_FEATURES"], |
| 287 | }, |
| 288 | }, |
| 289 | } |
| 290 | |
| 291 | soong_config_module_type { |
| 292 | name: "qti_camera_device", |
| 293 | module_type: "cc_defaults", |
| 294 | config_namespace: "blissQcomVars", |
| 295 | bool_variables: ["uses_qti_camera_device"], |
| 296 | properties: [ |
| 297 | "cppflags", |
| 298 | "shared_libs", |
| 299 | ], |
| 300 | } |
| 301 | |
| 302 | qti_camera_device { |
| 303 | name: "qti_camera_device_defaults", |
| 304 | soong_config_variables: { |
| 305 | uses_qti_camera_device: { |
| 306 | cppflags: ["-DQTI_CAMERA_DEVICE"], |
| 307 | shared_libs: ["vendor.qti.hardware.camera.device@1.0"], |
| 308 | }, |
| 309 | }, |
| 310 | } |
| 311 | |
| 312 | soong_config_module_type { |
LuK1337 | e7aff48 | 2021-04-10 10:56:15 +0200 | [diff] [blame] | 313 | name: "qti_usb_hal_supported_modes", |
| 314 | module_type: "cc_defaults", |
| 315 | config_namespace: "blissQcomVars", |
| 316 | bool_variables: ["supports_audio_accessory", "supports_debug_accessory"], |
| 317 | properties: [ |
| 318 | "cppflags", |
| 319 | ], |
| 320 | } |
| 321 | |
| 322 | qti_usb_hal_supported_modes { |
| 323 | name: "qti_usb_hal_supported_modes_defaults", |
| 324 | soong_config_variables: { |
| 325 | supports_audio_accessory: { |
| 326 | cppflags: ["-DSUPPORTS_AUDIO_ACCESSORY"], |
| 327 | }, |
| 328 | supports_debug_accessory: { |
| 329 | cppflags: ["-DSUPPORTS_DEBUG_ACCESSORY"], |
| 330 | }, |
| 331 | }, |
| 332 | } |
| 333 | |
| 334 | soong_config_module_type { |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 335 | name: "extended_compress_format", |
| 336 | module_type: "cc_defaults", |
| 337 | config_namespace: "blissQcomVars", |
| 338 | bool_variables: ["supports_extended_compress_format"], |
| 339 | properties: ["cflags"], |
| 340 | } |
| 341 | |
| 342 | extended_compress_format { |
| 343 | name: "extended_compress_format_defaults", |
| 344 | soong_config_variables: { |
| 345 | supports_extended_compress_format: { |
| 346 | cflags: ["-DENABLE_EXTENDED_COMPRESS_FORMAT"], |
| 347 | }, |
| 348 | }, |
| 349 | } |
| 350 | |
| 351 | soong_config_module_type { |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 352 | name: "surfaceflinger_qcom_extensions", |
| 353 | module_type: "cc_defaults", |
| 354 | config_namespace: "blissQcomVars", |
Alessandro Astone | 3fc779e | 2021-01-05 18:04:14 +0100 | [diff] [blame] | 355 | value_variables: ["qcom_display_headers_namespace"], |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 356 | properties: [ |
| 357 | "cppflags", |
| 358 | "header_libs", |
| 359 | ], |
| 360 | } |
| 361 | |
| 362 | surfaceflinger_qcom_extensions { |
| 363 | name: "surfaceflinger_qcom_ext_defaults", |
| 364 | soong_config_variables: { |
Alessandro Astone | 3fc779e | 2021-01-05 18:04:14 +0100 | [diff] [blame] | 365 | qcom_display_headers_namespace: { |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 366 | cppflags: ["-DQCOM_UM_FAMILY"], |
Alessandro Astone | 3fc779e | 2021-01-05 18:04:14 +0100 | [diff] [blame] | 367 | header_libs: ["//%s:display_intf_headers"], |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 368 | }, |
| 369 | }, |
| 370 | } |
| 371 | |
| 372 | soong_config_module_type { |
daniml3 | 25cc527 | 2021-01-21 16:56:41 +0100 | [diff] [blame] | 373 | name: "inputdispatcher_skip_event_key", |
| 374 | module_type: "cc_defaults", |
| 375 | config_namespace: "blissGlobalVars", |
| 376 | value_variables: ["target_inputdispatcher_skip_event_key"], |
| 377 | properties: ["cppflags"], |
| 378 | } |
| 379 | |
| 380 | inputdispatcher_skip_event_key { |
| 381 | name: "inputdispatcher_skip_event_key_defaults", |
| 382 | soong_config_variables: { |
| 383 | target_inputdispatcher_skip_event_key: { |
| 384 | cppflags: ["-DINPUTDISPATCHER_SKIP_EVENT_KEY=%s"], |
| 385 | }, |
| 386 | }, |
| 387 | } |
cjh1249131356 | 82ceb03 | 2023-03-26 14:34:28 -0500 | [diff] [blame] | 388 | |
| 389 | soong_config_module_type { |
| 390 | name: "uses_oplus_camera", |
| 391 | module_type: "cc_defaults", |
| 392 | config_namespace: "blissGlobalVars", |
| 393 | bool_variables: ["uses_oplus_camera"], |
| 394 | properties: ["cppflags"], |
| 395 | } |
| 396 | |
| 397 | uses_oplus_camera { |
| 398 | name: "uses_oplus_camera_defaults", |
| 399 | soong_config_variables: { |
| 400 | uses_oplus_camera: { |
| 401 | cppflags: ["-DUSES_OPLUS_CAMERA"], |
| 402 | }, |
| 403 | }, |
| 404 | } |
cjh1249131356 | 5a49002 | 2023-03-26 15:01:07 -0500 | [diff] [blame] | 405 | |
| 406 | soong_config_module_type { |
| 407 | name: "uses_nothing_camera", |
| 408 | module_type: "cc_defaults", |
| 409 | config_namespace: "blissGlobalVars", |
| 410 | bool_variables: ["uses_nothing_camera"], |
| 411 | properties: ["cppflags"], |
| 412 | } |
| 413 | |
| 414 | uses_nothing_camera { |
| 415 | name: "uses_nothing_camera_defaults", |
| 416 | soong_config_variables: { |
| 417 | uses_nothing_camera: { |
| 418 | cppflags: ["-DUSES_NOTHING_CAMERA"], |
| 419 | }, |
| 420 | }, |
| 421 | } |