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 { |
| 54 | name: "gralloc_10_usage_bits", |
| 55 | module_type: "cc_defaults", |
| 56 | config_namespace: "blissGlobalVars", |
| 57 | value_variables: ["additional_gralloc_10_usage_bits"], |
| 58 | properties: ["cppflags"], |
| 59 | } |
| 60 | |
| 61 | gralloc_10_usage_bits { |
| 62 | name: "gralloc_10_usage_bits_defaults", |
| 63 | soong_config_variables: { |
| 64 | additional_gralloc_10_usage_bits: { |
| 65 | cppflags: ["-DADDNL_GRALLOC_10_USAGE_BITS=%s"], |
| 66 | }, |
| 67 | }, |
| 68 | } |
| 69 | |
| 70 | soong_config_module_type { |
Chirayu Desai | 981d210 | 2022-09-17 04:47:54 +0530 | [diff] [blame] | 71 | name: "gralloc_handle_reserved_size", |
| 72 | module_type: "cc_defaults", |
| 73 | config_namespace: "blissGlobalVars", |
| 74 | bool_variables: ["gralloc_handle_has_reserved_size"], |
| 75 | properties: ["export_cflags"], |
| 76 | } |
| 77 | |
| 78 | gralloc_handle_reserved_size { |
| 79 | name: "gralloc_handle_has_reserved_size_defaults", |
| 80 | soong_config_variables: { |
| 81 | gralloc_handle_has_reserved_size: { |
| 82 | export_cflags: ["-DGRALLOC_HANDLE_HAS_RESERVED_SIZE"], |
| 83 | }, |
| 84 | }, |
| 85 | } |
| 86 | |
| 87 | soong_config_module_type { |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 88 | name: "target_shim_libs", |
| 89 | module_type: "cc_defaults", |
| 90 | config_namespace: "blissGlobalVars", |
| 91 | value_variables: ["target_ld_shim_libs"], |
| 92 | properties: ["cppflags"], |
| 93 | } |
| 94 | |
| 95 | target_shim_libs { |
| 96 | name: "shim_libs_defaults", |
| 97 | soong_config_variables: { |
| 98 | target_ld_shim_libs: { |
| 99 | cppflags: ["-DLD_SHIM_LIBS=\"%s\""], |
| 100 | }, |
| 101 | }, |
| 102 | } |
| 103 | |
| 104 | soong_config_module_type { |
| 105 | name: "vendor_init", |
| 106 | module_type: "cc_defaults", |
| 107 | config_namespace: "blissGlobalVars", |
| 108 | value_variables: ["target_init_vendor_lib"], |
| 109 | properties: ["whole_static_libs"], |
| 110 | } |
| 111 | |
| 112 | vendor_init { |
| 113 | name: "vendor_init_defaults", |
| 114 | soong_config_variables: { |
| 115 | target_init_vendor_lib: { |
| 116 | whole_static_libs: ["%s"], |
| 117 | }, |
| 118 | }, |
| 119 | } |
| 120 | |
| 121 | soong_config_module_type { |
TheScarastic | 8541a94 | 2021-10-19 08:07:54 +0000 | [diff] [blame] | 122 | name: "surfaceflinger_udfps_lib", |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 123 | module_type: "cc_defaults", |
| 124 | config_namespace: "blissGlobalVars", |
TheScarastic | 8541a94 | 2021-10-19 08:07:54 +0000 | [diff] [blame] | 125 | value_variables: ["target_surfaceflinger_udfps_lib"], |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 126 | properties: [ |
| 127 | "cppflags", |
| 128 | "whole_static_libs", |
| 129 | ], |
| 130 | } |
| 131 | |
TheScarastic | 8541a94 | 2021-10-19 08:07:54 +0000 | [diff] [blame] | 132 | surfaceflinger_udfps_lib { |
| 133 | name: "surfaceflinger_udfps_lib_defaults", |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 134 | soong_config_variables: { |
TheScarastic | 8541a94 | 2021-10-19 08:07:54 +0000 | [diff] [blame] | 135 | target_surfaceflinger_udfps_lib: { |
| 136 | cppflags: ["-DTARGET_PROVIDES_UDFPS_LIB"], |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 137 | whole_static_libs: ["%s"], |
| 138 | }, |
| 139 | }, |
| 140 | } |
| 141 | |
| 142 | soong_config_module_type { |
Lup Gabriel | 09fc685 | 2021-06-06 18:24:41 +0900 | [diff] [blame] | 143 | name: "camera_needs_client_info", |
Marko Man | 25a4ca4 | 2021-08-06 22:26:43 -0500 | [diff] [blame] | 144 | module_type: "cc_defaults", |
| 145 | config_namespace: "blissGlobalVars", |
Lup Gabriel | 09fc685 | 2021-06-06 18:24:41 +0900 | [diff] [blame] | 146 | bool_variables: ["camera_needs_client_info"], |
Marko Man | 25a4ca4 | 2021-08-06 22:26:43 -0500 | [diff] [blame] | 147 | properties: ["cppflags"], |
| 148 | } |
| 149 | |
Lup Gabriel | 09fc685 | 2021-06-06 18:24:41 +0900 | [diff] [blame] | 150 | camera_needs_client_info { |
| 151 | name: "camera_needs_client_info_defaults", |
Marko Man | 25a4ca4 | 2021-08-06 22:26:43 -0500 | [diff] [blame] | 152 | soong_config_variables: { |
Lup Gabriel | 09fc685 | 2021-06-06 18:24:41 +0900 | [diff] [blame] | 153 | camera_needs_client_info: { |
| 154 | cppflags: ["-DCAMERA_NEEDS_CLIENT_INFO"], |
Marko Man | 25a4ca4 | 2021-08-06 22:26:43 -0500 | [diff] [blame] | 155 | }, |
| 156 | }, |
| 157 | } |
| 158 | |
| 159 | soong_config_module_type { |
Hikari-no-Tenshi | b3777b2 | 2022-10-15 20:50:45 -0500 | [diff] [blame] | 160 | name: "camera_needs_client_info_lib", |
| 161 | module_type: "cc_defaults", |
| 162 | config_namespace: "blissGlobalVars", |
| 163 | bool_variables: ["camera_needs_client_info_lib"], |
| 164 | properties: [ |
| 165 | "cppflags", |
| 166 | "shared_libs", |
| 167 | ], |
| 168 | } |
| 169 | |
| 170 | camera_needs_client_info_lib { |
| 171 | name: "camera_needs_client_info_lib_defaults", |
| 172 | soong_config_variables: { |
| 173 | camera_needs_client_info_lib: { |
| 174 | cppflags: ["-DCAMERA_NEEDS_CLIENT_INFO_LIB"], |
| 175 | shared_libs: ["//hardware/oneplus:vendor.oneplus.hardware.camera@1.0"], |
| 176 | }, |
| 177 | }, |
| 178 | } |
| 179 | |
| 180 | soong_config_module_type { |
Danny Trunk | bcd7220 | 2022-03-23 22:28:02 +0100 | [diff] [blame] | 181 | name: "egl_display_array", |
| 182 | module_type: "cc_defaults", |
| 183 | config_namespace: "blissGlobalVars", |
| 184 | bool_variables: ["uses_egl_display_array"], |
| 185 | properties: ["cflags"], |
| 186 | } |
| 187 | |
| 188 | egl_display_array { |
| 189 | name: "egl_display_array_defaults", |
| 190 | soong_config_variables: { |
| 191 | uses_egl_display_array: { |
| 192 | cflags: ["-DEGL_DISPLAY_ARRAY"], |
| 193 | }, |
| 194 | }, |
| 195 | } |
| 196 | |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 197 | // NVIDIA specific config modules |
| 198 | soong_config_module_type { |
| 199 | name: "nvidia_enhancements", |
| 200 | module_type: "cc_defaults", |
| 201 | config_namespace: "blissNvidiaVars", |
| 202 | bool_variables: ["uses_nvidia_enhancements"], |
| 203 | properties: ["cppflags"], |
| 204 | } |
| 205 | |
| 206 | nvidia_enhancements { |
| 207 | name: "nvidia_enhancements_defaults", |
| 208 | soong_config_variables: { |
| 209 | uses_nvidia_enhancements: { |
| 210 | cppflags: ["-DNV_ANDROID_FRAMEWORK_ENHANCEMENTS"], |
| 211 | }, |
| 212 | }, |
| 213 | } |
| 214 | |
| 215 | // QCOM specific config modules |
| 216 | soong_config_module_type { |
| 217 | name: "librmnetctl_pre_uplink", |
| 218 | module_type: "cc_defaults", |
| 219 | config_namespace: "blissQcomVars", |
| 220 | bool_variables: ["uses_pre_uplink_features_netmgrd"], |
| 221 | properties: ["cflags"], |
| 222 | } |
| 223 | |
| 224 | librmnetctl_pre_uplink { |
| 225 | name: "librmnetctl_pre_uplink_defaults", |
| 226 | soong_config_variables: { |
| 227 | uses_pre_uplink_features_netmgrd: { |
| 228 | cflags: ["-DNO_UPLINK_FEATURES"], |
| 229 | }, |
| 230 | }, |
| 231 | } |
| 232 | |
| 233 | soong_config_module_type { |
| 234 | name: "qti_camera_device", |
| 235 | module_type: "cc_defaults", |
| 236 | config_namespace: "blissQcomVars", |
| 237 | bool_variables: ["uses_qti_camera_device"], |
| 238 | properties: [ |
| 239 | "cppflags", |
| 240 | "shared_libs", |
| 241 | ], |
| 242 | } |
| 243 | |
| 244 | qti_camera_device { |
| 245 | name: "qti_camera_device_defaults", |
| 246 | soong_config_variables: { |
| 247 | uses_qti_camera_device: { |
| 248 | cppflags: ["-DQTI_CAMERA_DEVICE"], |
| 249 | shared_libs: ["vendor.qti.hardware.camera.device@1.0"], |
| 250 | }, |
| 251 | }, |
| 252 | } |
| 253 | |
| 254 | soong_config_module_type { |
LuK1337 | e7aff48 | 2021-04-10 10:56:15 +0200 | [diff] [blame] | 255 | name: "qti_usb_hal_supported_modes", |
| 256 | module_type: "cc_defaults", |
| 257 | config_namespace: "blissQcomVars", |
| 258 | bool_variables: ["supports_audio_accessory", "supports_debug_accessory"], |
| 259 | properties: [ |
| 260 | "cppflags", |
| 261 | ], |
| 262 | } |
| 263 | |
| 264 | qti_usb_hal_supported_modes { |
| 265 | name: "qti_usb_hal_supported_modes_defaults", |
| 266 | soong_config_variables: { |
| 267 | supports_audio_accessory: { |
| 268 | cppflags: ["-DSUPPORTS_AUDIO_ACCESSORY"], |
| 269 | }, |
| 270 | supports_debug_accessory: { |
| 271 | cppflags: ["-DSUPPORTS_DEBUG_ACCESSORY"], |
| 272 | }, |
| 273 | }, |
| 274 | } |
| 275 | |
| 276 | soong_config_module_type { |
jhenrique09 | ad4d1ad | 2020-11-23 14:20:20 +0000 | [diff] [blame] | 277 | name: "camera_boottime_timestamp", |
| 278 | module_type: "cc_defaults", |
| 279 | config_namespace: "blissQcomVars", |
| 280 | bool_variables: ["needs_camera_boottime_timestamp"], |
| 281 | properties: [ |
| 282 | "cflags", |
| 283 | ], |
| 284 | } |
| 285 | |
| 286 | camera_boottime_timestamp { |
| 287 | name: "needs_camera_boottime_defaults", |
| 288 | soong_config_variables: { |
| 289 | needs_camera_boottime_timestamp: { |
| 290 | cflags: ["-DTARGET_CAMERA_BOOTTIME_TIMESTAMP"], |
| 291 | }, |
| 292 | }, |
| 293 | } |
| 294 | |
| 295 | soong_config_module_type { |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 296 | name: "extended_compress_format", |
| 297 | module_type: "cc_defaults", |
| 298 | config_namespace: "blissQcomVars", |
| 299 | bool_variables: ["supports_extended_compress_format"], |
| 300 | properties: ["cflags"], |
| 301 | } |
| 302 | |
| 303 | extended_compress_format { |
| 304 | name: "extended_compress_format_defaults", |
| 305 | soong_config_variables: { |
| 306 | supports_extended_compress_format: { |
| 307 | cflags: ["-DENABLE_EXTENDED_COMPRESS_FORMAT"], |
| 308 | }, |
| 309 | }, |
| 310 | } |
| 311 | |
| 312 | soong_config_module_type { |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 313 | name: "surfaceflinger_qcom_extensions", |
| 314 | module_type: "cc_defaults", |
| 315 | config_namespace: "blissQcomVars", |
Alessandro Astone | 3fc779e | 2021-01-05 18:04:14 +0100 | [diff] [blame] | 316 | value_variables: ["qcom_display_headers_namespace"], |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 317 | properties: [ |
| 318 | "cppflags", |
| 319 | "header_libs", |
| 320 | ], |
| 321 | } |
| 322 | |
| 323 | surfaceflinger_qcom_extensions { |
| 324 | name: "surfaceflinger_qcom_ext_defaults", |
| 325 | soong_config_variables: { |
Alessandro Astone | 3fc779e | 2021-01-05 18:04:14 +0100 | [diff] [blame] | 326 | qcom_display_headers_namespace: { |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 327 | cppflags: ["-DQCOM_UM_FAMILY"], |
Alessandro Astone | 3fc779e | 2021-01-05 18:04:14 +0100 | [diff] [blame] | 328 | header_libs: ["//%s:display_intf_headers"], |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 329 | }, |
| 330 | }, |
| 331 | } |
| 332 | |
| 333 | soong_config_module_type { |
daniml3 | 25cc527 | 2021-01-21 16:56:41 +0100 | [diff] [blame] | 334 | name: "inputdispatcher_skip_event_key", |
| 335 | module_type: "cc_defaults", |
| 336 | config_namespace: "blissGlobalVars", |
| 337 | value_variables: ["target_inputdispatcher_skip_event_key"], |
| 338 | properties: ["cppflags"], |
| 339 | } |
| 340 | |
| 341 | inputdispatcher_skip_event_key { |
| 342 | name: "inputdispatcher_skip_event_key_defaults", |
| 343 | soong_config_variables: { |
| 344 | target_inputdispatcher_skip_event_key: { |
| 345 | cppflags: ["-DINPUTDISPATCHER_SKIP_EVENT_KEY=%s"], |
| 346 | }, |
| 347 | }, |
| 348 | } |
cjh1249131356 | 82ceb03 | 2023-03-26 14:34:28 -0500 | [diff] [blame^] | 349 | |
| 350 | soong_config_module_type { |
| 351 | name: "uses_oplus_camera", |
| 352 | module_type: "cc_defaults", |
| 353 | config_namespace: "blissGlobalVars", |
| 354 | bool_variables: ["uses_oplus_camera"], |
| 355 | properties: ["cppflags"], |
| 356 | } |
| 357 | |
| 358 | uses_oplus_camera { |
| 359 | name: "uses_oplus_camera_defaults", |
| 360 | soong_config_variables: { |
| 361 | uses_oplus_camera: { |
| 362 | cppflags: ["-DUSES_OPLUS_CAMERA"], |
| 363 | }, |
| 364 | }, |
| 365 | } |