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 { |
| 71 | name: "target_process_sdk_version_overrides", |
| 72 | module_type: "cc_defaults", |
| 73 | config_namespace: "blissGlobalVars", |
| 74 | value_variables: ["target_process_sdk_version_override"], |
| 75 | properties: ["cppflags"], |
| 76 | } |
| 77 | |
| 78 | target_process_sdk_version_overrides { |
| 79 | name: "process_sdk_version_overrides_defaults", |
| 80 | soong_config_variables: { |
| 81 | target_process_sdk_version_override: { |
| 82 | cppflags: ["-DSDK_VERSION_OVERRIDES=\"%s\""], |
| 83 | }, |
| 84 | }, |
| 85 | } |
| 86 | |
| 87 | soong_config_module_type { |
| 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 { |
| 122 | name: "surfaceflinger_fod_lib", |
| 123 | module_type: "cc_defaults", |
| 124 | config_namespace: "blissGlobalVars", |
| 125 | value_variables: ["target_surfaceflinger_fod_lib"], |
| 126 | properties: [ |
| 127 | "cppflags", |
| 128 | "whole_static_libs", |
| 129 | ], |
| 130 | } |
| 131 | |
| 132 | surfaceflinger_fod_lib { |
| 133 | name: "surfaceflinger_fod_lib_defaults", |
| 134 | soong_config_variables: { |
| 135 | target_surfaceflinger_fod_lib: { |
| 136 | cppflags: ["-DTARGET_PROVIDES_FOD_LIB"], |
| 137 | whole_static_libs: ["%s"], |
| 138 | }, |
| 139 | }, |
| 140 | } |
| 141 | |
| 142 | soong_config_module_type { |
| 143 | name: "ignores_ftp_pptp_conntrack_failure_defaults", |
| 144 | module_type: "cc_defaults", |
| 145 | config_namespace: "blissGlobalVars", |
| 146 | bool_variables: ["ignores_ftp_pptp_conntrack_failure"], |
| 147 | properties: ["cppflags"], |
| 148 | } |
| 149 | |
| 150 | ignores_ftp_pptp_conntrack_failure_defaults { |
| 151 | name: "ignores_ftp_pptp_conntrack_failure", |
| 152 | soong_config_variables: { |
| 153 | ignores_ftp_pptp_conntrack_failure: { |
Aayush Gupta | 3f8f66c | 2020-10-21 16:29:53 +0530 | [diff] [blame] | 154 | cppflags: ["-DIGNORES_FTP_PPTP_CONNTRACK_FAILURE"], |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 155 | }, |
| 156 | }, |
| 157 | } |
| 158 | |
| 159 | soong_config_module_type { |
| 160 | name: "needs_netd_direct_connect_rule", |
| 161 | module_type: "cc_defaults", |
| 162 | config_namespace: "blissGlobalVars", |
| 163 | bool_variables: ["needs_netd_direct_connect_rule"], |
| 164 | properties: ["cppflags"], |
| 165 | } |
| 166 | |
| 167 | needs_netd_direct_connect_rule { |
| 168 | name: "needs_netd_direct_connect_rule_defaults", |
| 169 | soong_config_variables: { |
| 170 | needs_netd_direct_connect_rule: { |
| 171 | cppflags: ["-DNEEDS_NETD_DIRECT_CONNECT_RULE"], |
| 172 | }, |
| 173 | }, |
| 174 | } |
| 175 | |
| 176 | soong_config_module_type { |
| 177 | name: "no_cameraserver", |
| 178 | module_type: "cc_defaults", |
| 179 | config_namespace: "blissGlobalVars", |
| 180 | bool_variables: ["has_legacy_camera_hal1"], |
| 181 | properties: [ |
| 182 | "cppflags", |
| 183 | ], |
| 184 | } |
| 185 | |
| 186 | no_cameraserver { |
| 187 | name: "no_cameraserver_defaults", |
| 188 | soong_config_variables: { |
| 189 | has_legacy_camera_hal1: { |
| 190 | cppflags: [ |
| 191 | "-DNO_CAMERA_SERVER", |
| 192 | "-Wno-overloaded-virtual", |
| 193 | ], |
| 194 | }, |
| 195 | }, |
| 196 | } |
| 197 | |
| 198 | soong_config_module_type { |
| 199 | name: "camera_in_mediaserver", |
| 200 | module_type: "cc_defaults", |
| 201 | config_namespace: "blissGlobalVars", |
| 202 | bool_variables: ["has_legacy_camera_hal1"], |
| 203 | properties: [ |
| 204 | "overrides", |
| 205 | "shared_libs", |
| 206 | ], |
| 207 | } |
| 208 | |
| 209 | camera_in_mediaserver { |
| 210 | name: "camera_in_mediaserver_defaults", |
| 211 | defaults: ["no_cameraserver_defaults"], |
| 212 | soong_config_variables: { |
| 213 | has_legacy_camera_hal1: { |
| 214 | overrides: ["cameraserver"], |
| 215 | shared_libs: [ |
| 216 | "android.hardware.camera.common@1.0", |
| 217 | "android.hardware.camera.device@3.4", |
| 218 | "android.hardware.camera.provider@2.6", |
| 219 | "libcameraservice", |
| 220 | "libgui", |
| 221 | ], |
| 222 | }, |
| 223 | }, |
| 224 | } |
| 225 | |
| 226 | soong_config_module_type { |
| 227 | name: "bootloader_message_offset", |
| 228 | module_type: "cc_defaults", |
| 229 | config_namespace: "blissGlobalVars", |
| 230 | value_variables: ["bootloader_message_offset"], |
Alessandro Astone | be38c0a | 2020-10-01 13:01:36 +0200 | [diff] [blame] | 231 | properties: [ |
| 232 | "cflags", |
| 233 | "export_cflags", |
| 234 | ], |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 235 | } |
| 236 | |
| 237 | bootloader_message_offset { |
| 238 | name: "bootloader_message_offset_defaults", |
| 239 | soong_config_variables: { |
| 240 | bootloader_message_offset: { |
| 241 | cflags: ["-DBOARD_RECOVERY_BLDRMSG_OFFSET=%s"], |
Alessandro Astone | be38c0a | 2020-10-01 13:01:36 +0200 | [diff] [blame] | 242 | export_cflags: ["-DBOARD_RECOVERY_BLDRMSG_OFFSET=%s"], |
Pig | 02f678a | 2020-10-15 02:58:37 +0800 | [diff] [blame] | 243 | }, |
| 244 | }, |
| 245 | } |
| 246 | |
| 247 | soong_config_module_type { |
| 248 | name: "camera_parameter_library", |
| 249 | module_type: "cc_defaults", |
| 250 | config_namespace: "blissGlobalVars", |
| 251 | value_variables: ["uses_camera_parameter_lib"], |
| 252 | properties: ["whole_static_libs"], |
| 253 | } |
| 254 | |
| 255 | camera_parameter_library { |
| 256 | name: "camera_parameter_library_defaults", |
| 257 | soong_config_variables: { |
| 258 | uses_camera_parameter_lib: { |
| 259 | whole_static_libs: ["%s"], |
| 260 | }, |
| 261 | }, |
| 262 | } |
| 263 | |
| 264 | // NVIDIA specific config modules |
| 265 | soong_config_module_type { |
| 266 | name: "nvidia_enhancements", |
| 267 | module_type: "cc_defaults", |
| 268 | config_namespace: "blissNvidiaVars", |
| 269 | bool_variables: ["uses_nvidia_enhancements"], |
| 270 | properties: ["cppflags"], |
| 271 | } |
| 272 | |
| 273 | nvidia_enhancements { |
| 274 | name: "nvidia_enhancements_defaults", |
| 275 | soong_config_variables: { |
| 276 | uses_nvidia_enhancements: { |
| 277 | cppflags: ["-DNV_ANDROID_FRAMEWORK_ENHANCEMENTS"], |
| 278 | }, |
| 279 | }, |
| 280 | } |
| 281 | |
| 282 | // QCOM specific config modules |
| 283 | soong_config_module_type { |
| 284 | name: "librmnetctl_pre_uplink", |
| 285 | module_type: "cc_defaults", |
| 286 | config_namespace: "blissQcomVars", |
| 287 | bool_variables: ["uses_pre_uplink_features_netmgrd"], |
| 288 | properties: ["cflags"], |
| 289 | } |
| 290 | |
| 291 | librmnetctl_pre_uplink { |
| 292 | name: "librmnetctl_pre_uplink_defaults", |
| 293 | soong_config_variables: { |
| 294 | uses_pre_uplink_features_netmgrd: { |
| 295 | cflags: ["-DNO_UPLINK_FEATURES"], |
| 296 | }, |
| 297 | }, |
| 298 | } |
| 299 | |
| 300 | soong_config_module_type { |
| 301 | name: "qti_camera_device", |
| 302 | module_type: "cc_defaults", |
| 303 | config_namespace: "blissQcomVars", |
| 304 | bool_variables: ["uses_qti_camera_device"], |
| 305 | properties: [ |
| 306 | "cppflags", |
| 307 | "shared_libs", |
| 308 | ], |
| 309 | } |
| 310 | |
| 311 | qti_camera_device { |
| 312 | name: "qti_camera_device_defaults", |
| 313 | soong_config_variables: { |
| 314 | uses_qti_camera_device: { |
| 315 | cppflags: ["-DQTI_CAMERA_DEVICE"], |
| 316 | shared_libs: ["vendor.qti.hardware.camera.device@1.0"], |
| 317 | }, |
| 318 | }, |
| 319 | } |
| 320 | |
| 321 | soong_config_module_type { |
| 322 | name: "extended_compress_format", |
| 323 | module_type: "cc_defaults", |
| 324 | config_namespace: "blissQcomVars", |
| 325 | bool_variables: ["supports_extended_compress_format"], |
| 326 | properties: ["cflags"], |
| 327 | } |
| 328 | |
| 329 | extended_compress_format { |
| 330 | name: "extended_compress_format_defaults", |
| 331 | soong_config_variables: { |
| 332 | supports_extended_compress_format: { |
| 333 | cflags: ["-DENABLE_EXTENDED_COMPRESS_FORMAT"], |
| 334 | }, |
| 335 | }, |
| 336 | } |
| 337 | |
| 338 | soong_config_module_type { |
| 339 | name: "vold_hw_fde", |
| 340 | module_type: "cc_defaults", |
| 341 | config_namespace: "blissQcomVars", |
| 342 | bool_variables: ["supports_hw_fde"], |
| 343 | properties: [ |
| 344 | "cflags", |
| 345 | "header_libs", |
| 346 | "shared_libs", |
| 347 | ], |
| 348 | } |
| 349 | |
| 350 | vold_hw_fde { |
| 351 | name: "vold_hw_fde_defaults", |
| 352 | soong_config_variables: { |
| 353 | supports_hw_fde: { |
| 354 | cflags: ["-DCONFIG_HW_DISK_ENCRYPTION"], |
| 355 | header_libs: ["libcryptfs_hw_headers"], |
| 356 | shared_libs: ["libcryptfs_hw"], |
| 357 | }, |
| 358 | }, |
| 359 | } |
| 360 | |
| 361 | soong_config_module_type { |
| 362 | name: "vold_hw_fde_perf", |
| 363 | module_type: "cc_defaults", |
| 364 | config_namespace: "blissQcomVars", |
| 365 | bool_variables: ["supports_hw_fde_perf"], |
| 366 | properties: [ |
| 367 | "cflags", |
| 368 | "shared_libs", |
| 369 | ], |
| 370 | } |
| 371 | |
| 372 | vold_hw_fde_perf { |
| 373 | name: "vold_hw_fde_perf_defaults", |
| 374 | soong_config_variables: { |
| 375 | supports_hw_fde_perf: { |
| 376 | cflags: ["-DCONFIG_HW_DISK_ENCRYPT_PERF"], |
| 377 | shared_libs: ["libcryptfs_hw"], |
| 378 | }, |
| 379 | }, |
| 380 | } |
| 381 | |
| 382 | soong_config_module_type { |
| 383 | name: "qti_cryptfshw_qsee", |
| 384 | module_type: "cc_defaults", |
| 385 | config_namespace: "blissQcomVars", |
| 386 | bool_variables: ["should_wait_for_qsee"], |
| 387 | properties: ["cflags"], |
| 388 | } |
| 389 | |
| 390 | qti_cryptfshw_qsee { |
| 391 | name: "qti_cryptfshw_qsee_defaults", |
| 392 | soong_config_variables: { |
| 393 | should_wait_for_qsee: { |
| 394 | cflags: ["-DWAIT_FOR_QSEE"], |
| 395 | }, |
| 396 | }, |
| 397 | } |
| 398 | |
| 399 | soong_config_module_type { |
| 400 | name: "surfaceflinger_qcom_extensions", |
| 401 | module_type: "cc_defaults", |
| 402 | config_namespace: "blissQcomVars", |
| 403 | value_variables: ["qcom_soong_namespace"], |
| 404 | properties: [ |
| 405 | "cppflags", |
| 406 | "header_libs", |
| 407 | ], |
| 408 | } |
| 409 | |
| 410 | surfaceflinger_qcom_extensions { |
| 411 | name: "surfaceflinger_qcom_ext_defaults", |
| 412 | soong_config_variables: { |
| 413 | qcom_soong_namespace: { |
| 414 | cppflags: ["-DQCOM_UM_FAMILY"], |
| 415 | header_libs: ["//%s/display:display_intf_headers"], |
| 416 | }, |
| 417 | }, |
| 418 | } |
| 419 | |
| 420 | soong_config_module_type { |
| 421 | name: "stagefright_qcom_legacy", |
| 422 | module_type: "cc_defaults", |
| 423 | config_namespace: "blissQcomVars", |
| 424 | bool_variables: ["uses_qcom_bsp_legacy"], |
| 425 | properties: ["cppflags"], |
| 426 | } |
| 427 | |
| 428 | stagefright_qcom_legacy { |
| 429 | name: "stagefright_qcom_legacy_defaults", |
| 430 | soong_config_variables: { |
| 431 | uses_qcom_bsp_legacy: { |
| 432 | cppflags: ["-DQCOM_BSP_LEGACY"], |
| 433 | }, |
| 434 | }, |
| 435 | } |