Files
vendor_strix/build/soong/Android.bp
Bruno Martins c3dda454e3 Hookup GRALLOC_HANDLE_HAS_CUSTOM_CONTENT_MD_RESERVED_SIZE
The gralloc struct has been conditionally adjusted not to
break blobs that use the old struct.

So far only GRALLOC_HANDLE_HAS_RESERVED_SIZE was hooked up
for Google Pixels, but it's now time to hook up the remaining flag.

Change-Id: I175bd328bd9733b9487e349f7a8486f15ef0a450
2023-07-25 18:14:17 +02:00

363 lines
9.9 KiB
Plaintext

// LineageOS soong configs
bootstrap_go_package {
name: "soong-lineage-generator",
pkgPath: "lineage/soong/generator",
deps: [
"blueprint",
"blueprint-pathtools",
"soong",
"soong-android",
"soong-shared",
],
srcs: [
"generator/generator.go",
"generator/variables.go",
],
pluginFor: ["soong_build"],
}
lineage_generator {
name: "generated_kernel_includes",
// The headers make command
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",
// Directories that can be imported by a cc_* module generated_headers property
export_include_dirs: [
"usr/audio/include/uapi",
"usr/include",
"usr/include/audio",
"usr/include/audio/include/uapi",
"usr/techpack/audio/include",
],
// Sources for dependency tracking
dep_root: "$(TARGET_KERNEL_SOURCE)",
dep_files: [
"Makefile",
"include/**/*",
"arch/$(KERNEL_ARCH)/include/**/*",
"techpack/audio/include/**/*",
],
}
cc_library_headers {
name: "generated_kernel_headers",
generated_headers: ["generated_kernel_includes"],
export_generated_headers: ["generated_kernel_includes"],
vendor_available: true,
recovery_available: true,
}
// Target platform agnostic config modules
soong_config_module_type {
name: "aapt_version_code",
module_type: "java_defaults",
config_namespace: "lineageGlobalVars",
value_variables: ["aapt_version_code"],
properties: ["aaptflags"],
}
aapt_version_code {
name: "aapt_version_code_defaults",
soong_config_variables: {
aapt_version_code: {
aaptflags: [
"--version-code",
"%s",
],
},
},
}
soong_config_module_type {
name: "gralloc_10_usage_bits",
module_type: "cc_defaults",
config_namespace: "lineageGlobalVars",
value_variables: ["additional_gralloc_10_usage_bits"],
properties: ["cppflags"],
}
gralloc_10_usage_bits {
name: "gralloc_10_usage_bits_defaults",
soong_config_variables: {
additional_gralloc_10_usage_bits: {
cppflags: ["-DADDNL_GRALLOC_10_USAGE_BITS=%s"],
},
},
}
soong_config_module_type {
name: "gralloc_handle_custom_content_md_reserved_size",
module_type: "cc_defaults",
config_namespace: "lineageGlobalVars",
bool_variables: ["gralloc_handle_has_custom_content_md_reserved_size"],
properties: ["export_cflags"],
}
gralloc_handle_custom_content_md_reserved_size {
name: "gralloc_handle_has_custom_content_md_reserved_size_defaults",
soong_config_variables: {
gralloc_handle_has_custom_content_md_reserved_size: {
export_cflags: ["-DGRALLOC_HANDLE_HAS_CUSTOM_CONTENT_MD_RESERVED_SIZE"],
},
},
}
soong_config_module_type {
name: "gralloc_handle_reserved_size",
module_type: "cc_defaults",
config_namespace: "lineageGlobalVars",
bool_variables: ["gralloc_handle_has_reserved_size"],
properties: ["export_cflags"],
}
gralloc_handle_reserved_size {
name: "gralloc_handle_has_reserved_size_defaults",
soong_config_variables: {
gralloc_handle_has_reserved_size: {
export_cflags: ["-DGRALLOC_HANDLE_HAS_RESERVED_SIZE"],
},
},
}
soong_config_module_type {
name: "target_shim_libs",
module_type: "cc_defaults",
config_namespace: "lineageGlobalVars",
value_variables: ["target_ld_shim_libs"],
properties: ["cppflags"],
}
target_shim_libs {
name: "shim_libs_defaults",
soong_config_variables: {
target_ld_shim_libs: {
cppflags: ["-DLD_SHIM_LIBS=\"%s\""],
},
},
}
soong_config_module_type {
name: "vendor_init",
module_type: "cc_defaults",
config_namespace: "lineageGlobalVars",
value_variables: ["target_init_vendor_lib"],
properties: ["whole_static_libs"],
}
vendor_init {
name: "vendor_init_defaults",
soong_config_variables: {
target_init_vendor_lib: {
whole_static_libs: ["%s"],
},
},
}
soong_config_module_type {
name: "surfaceflinger_udfps_lib",
module_type: "cc_defaults",
config_namespace: "lineageGlobalVars",
value_variables: ["target_surfaceflinger_udfps_lib"],
properties: [
"cppflags",
"whole_static_libs",
],
}
surfaceflinger_udfps_lib {
name: "surfaceflinger_udfps_lib_defaults",
soong_config_variables: {
target_surfaceflinger_udfps_lib: {
cppflags: ["-DTARGET_PROVIDES_UDFPS_LIB"],
whole_static_libs: ["%s"],
},
},
}
soong_config_module_type {
name: "trust_usb_control",
module_type: "cc_defaults",
config_namespace: "lineageGlobalVars",
value_variables: [
"target_trust_usb_control_path",
"target_trust_usb_control_enable",
"target_trust_usb_control_disable",
],
properties: ["cppflags"],
}
trust_usb_control {
name: "trust_usb_control_defaults",
soong_config_variables: {
target_trust_usb_control_path: {
cppflags: ["-DUSB_CONTROL_PATH=\"%s\""],
},
target_trust_usb_control_enable: {
cppflags: ["-DUSB_CONTROL_ENABLE=\"%s\""],
},
target_trust_usb_control_disable: {
cppflags: ["-DUSB_CONTROL_DISABLE=\"%s\""],
},
},
}
soong_config_module_type {
name: "bootloader_message_offset",
module_type: "cc_defaults",
config_namespace: "lineageGlobalVars",
value_variables: ["bootloader_message_offset"],
properties: [
"cflags",
"export_cflags",
],
}
bootloader_message_offset {
name: "bootloader_message_offset_defaults",
soong_config_variables: {
bootloader_message_offset: {
cflags: ["-DBOARD_RECOVERY_BLDRMSG_OFFSET=%s"],
export_cflags: ["-DBOARD_RECOVERY_BLDRMSG_OFFSET=%s"],
},
},
}
soong_config_module_type {
name: "egl_display_array",
module_type: "cc_defaults",
config_namespace: "lineageGlobalVars",
bool_variables: ["uses_egl_display_array"],
properties: ["cflags"],
}
egl_display_array {
name: "egl_display_array_defaults",
soong_config_variables: {
uses_egl_display_array: {
cflags: ["-DEGL_DISPLAY_ARRAY"],
},
},
}
soong_config_module_type {
name: "health_charging_control",
module_type: "cc_defaults",
config_namespace: "lineageGlobalVars",
bool_variables: [
"target_health_charging_control_supports_toggle",
"target_health_charging_control_supports_bypass",
"target_health_charging_control_supports_deadline",
],
value_variables: [
"target_health_charging_control_charging_path",
"target_health_charging_control_charging_enabled",
"target_health_charging_control_charging_disabled",
"target_health_charging_control_deadline_path",
],
properties: ["cppflags"],
}
health_charging_control {
name: "health_charging_control_defaults",
soong_config_variables: {
target_health_charging_control_supports_toggle: {
cppflags: ["-DHEALTH_CHARGING_CONTROL_SUPPORTS_TOGGLE"],
},
target_health_charging_control_supports_bypass: {
cppflags: ["-DHEALTH_CHARGING_CONTROL_SUPPORTS_BYPASS"],
},
target_health_charging_control_supports_deadline: {
cppflags: ["-DHEALTH_CHARGING_CONTROL_SUPPORTS_DEADLINE"],
},
target_health_charging_control_charging_path: {
cppflags: ["-DHEALTH_CHARGING_CONTROL_CHARGING_PATH=\"%s\""],
},
target_health_charging_control_charging_enabled: {
cppflags: ["-DHEALTH_CHARGING_CONTROL_CHARGING_ENABLED=\"%s\""],
},
target_health_charging_control_charging_disabled: {
cppflags: ["-DHEALTH_CHARGING_CONTROL_CHARGING_DISABLED=\"%s\""],
},
target_health_charging_control_deadline_path: {
cppflags: ["-DHEALTH_CHARGING_CONTROL_DEADLINE_PATH=\"%s\""],
},
},
}
// NVIDIA specific config modules
soong_config_module_type {
name: "nvidia_enhancements",
module_type: "cc_defaults",
config_namespace: "lineageNvidiaVars",
bool_variables: ["uses_nvidia_enhancements"],
properties: ["cppflags"],
}
nvidia_enhancements {
name: "nvidia_enhancements_defaults",
soong_config_variables: {
uses_nvidia_enhancements: {
cppflags: ["-DNV_ANDROID_FRAMEWORK_ENHANCEMENTS"],
},
},
}
// QCOM specific config modules
soong_config_module_type {
name: "librmnetctl_pre_uplink",
module_type: "cc_defaults",
config_namespace: "lineageQcomVars",
bool_variables: ["uses_pre_uplink_features_netmgrd"],
properties: ["cflags"],
}
librmnetctl_pre_uplink {
name: "librmnetctl_pre_uplink_defaults",
soong_config_variables: {
uses_pre_uplink_features_netmgrd: {
cflags: ["-DNO_UPLINK_FEATURES"],
},
},
}
soong_config_module_type {
name: "extended_compress_format",
module_type: "cc_defaults",
config_namespace: "lineageQcomVars",
bool_variables: ["supports_extended_compress_format"],
properties: ["cflags"],
}
extended_compress_format {
name: "extended_compress_format_defaults",
soong_config_variables: {
supports_extended_compress_format: {
cflags: ["-DENABLE_EXTENDED_COMPRESS_FORMAT"],
},
},
}
soong_config_module_type {
name: "surfaceflinger_qcom_extensions",
module_type: "cc_defaults",
config_namespace: "lineageQcomVars",
value_variables: ["qcom_display_headers_namespace"],
properties: [
"cppflags",
"header_libs",
],
}
surfaceflinger_qcom_extensions {
name: "surfaceflinger_qcom_ext_defaults",
soong_config_variables: {
qcom_display_headers_namespace: {
cppflags: ["-DQCOM_UM_FAMILY"],
header_libs: ["//%s:display_intf_headers"],
},
},
}