Pig | d7660f1 | 2020-10-15 02:58:37 +0800 | [diff] [blame^] | 1 | // Omni soong configs |
| 2 | |
Simon Shields | 8a28364 | 2017-08-23 12:03:36 +1000 | [diff] [blame] | 3 | bootstrap_go_package { |
Rashed Abdel-Tawab | e3f7fc9 | 2019-09-05 21:24:07 -0700 | [diff] [blame] | 4 | name: "soong-omnirom-generator", |
| 5 | pkgPath: "omnirom/soong/generator", |
Rashed Abdel-Tawab | 2735c4a | 2019-09-05 21:21:13 -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", |
| 15 | "generator/variables.go", |
| 16 | ], |
| 17 | pluginFor: ["soong_build"], |
| 18 | } |
| 19 | |
Rashed Abdel-Tawab | e3f7fc9 | 2019-09-05 21:24:07 -0700 | [diff] [blame] | 20 | omni_generator { |
Rashed Abdel-Tawab | 2735c4a | 2019-09-05 21:21:13 -0700 | [diff] [blame] | 21 | name: "generated_kernel_includes", |
| 22 | |
| 23 | // The headers make command |
Marko Man | ef69244 | 2019-10-08 13:27:09 +0200 | [diff] [blame] | 24 | 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-Tawab | 2735c4a | 2019-09-05 21:21:13 -0700 | [diff] [blame] | 25 | |
| 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 | |
| 34 | cc_library_headers { |
| 35 | name: "generated_kernel_headers", |
| 36 | generated_headers: ["generated_kernel_includes"], |
| 37 | export_generated_headers: ["generated_kernel_includes"], |
| 38 | vendor_available: true, |
LuK1337 | 587a7f7 | 2019-09-09 21:58:19 +0200 | [diff] [blame] | 39 | recovery_available: true, |
Rashed Abdel-Tawab | 2735c4a | 2019-09-05 21:21:13 -0700 | [diff] [blame] | 40 | } |
Pig | d7660f1 | 2020-10-15 02:58:37 +0800 | [diff] [blame^] | 41 | |
| 42 | soong_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 | |
| 54 | vendor_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 | |
| 66 | soong_config_module_type { |
| 67 | name: "surfaceflinger_fod_lib", |
| 68 | module_type: "cc_defaults", |
| 69 | config_namespace: "omniGlobalVars", |
| 70 | value_variables: ["target_surfaceflinger_fod_lib"], |
| 71 | properties: [ |
| 72 | "cppflags", |
| 73 | "whole_static_libs", |
| 74 | ], |
| 75 | } |
| 76 | |
| 77 | surfaceflinger_fod_lib { |
| 78 | name: "surfaceflinger_fod_lib_defaults", |
| 79 | soong_config_variables: { |
| 80 | target_surfaceflinger_fod_lib: { |
| 81 | cppflags: ["-DTARGET_PROVIDES_FOD_LIB"], |
| 82 | whole_static_libs: ["%s"], |
| 83 | }, |
| 84 | }, |
| 85 | } |
| 86 | |
| 87 | soong_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 | |
| 97 | use_sdclang { |
| 98 | name: "use_sdclang_defaults", |
| 99 | soong_config_variables: { |
| 100 | target_use_sdclang: { |
| 101 | cppflags: ["-DTARGET_USE_SDCLANG"], |
| 102 | }, |
| 103 | }, |
| 104 | } |
| 105 | |
| 106 | soong_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 | |
| 116 | camera_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 | |
| 125 | soong_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 | |
| 135 | enforce_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 | |
| 144 | soong_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 | |
| 152 | enable_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 | |
| 161 | soong_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 | |
| 169 | use_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 | |
| 178 | soong_config_module_type { |
| 179 | name: "needsHWCOnFirstRef", |
| 180 | module_type: "cc_defaults", |
| 181 | config_namespace: "omniGlobalVars", |
| 182 | bool_variables: ["targetNeedsHWCOnFirstRef"], |
| 183 | properties: ["cppflags"], |
| 184 | } |
| 185 | |
| 186 | needsHWCOnFirstRef { |
| 187 | name: "needsHWCOnFirstRef_defaults", |
| 188 | soong_config_variables: { |
| 189 | targetNeedsHWCOnFirstRef: { |
| 190 | cppflags: ["-DTARGET_NEEDS_HWC_ONFIRSTREF"], |
| 191 | }, |
| 192 | }, |
| 193 | } |
| 194 | |
| 195 | // QCOM specific config modules |
| 196 | soong_config_module_type { |
| 197 | name: "metadata_fde_key", |
| 198 | module_type: "cc_defaults", |
| 199 | config_namespace: "omniQcomVars", |
| 200 | bool_variables: ["uses_metadata_as_fde_key"], |
| 201 | properties: [ |
| 202 | "cppflags", |
| 203 | ], |
| 204 | } |
| 205 | |
| 206 | metadata_fde_key { |
| 207 | name: "metadata_fde_key_defaults", |
| 208 | soong_config_variables: { |
| 209 | uses_metadata_as_fde_key: { |
| 210 | cppflags: ["-DTARGET_USES_METADATA_AS_FDE_KEY"], |
| 211 | }, |
| 212 | }, |
| 213 | } |
| 214 | |
| 215 | soong_config_module_type { |
| 216 | name: "enable_tricolor_led", |
| 217 | module_type: "cc_defaults", |
| 218 | config_namespace: "omniQcomVars", |
| 219 | bool_variables: ["healthd_enable_tricolor_led"], |
| 220 | properties: ["cflags"], |
| 221 | } |
| 222 | |
| 223 | enable_tricolor_led { |
| 224 | name: "enable_tricolor_led_defaults", |
| 225 | soong_config_variables: { |
| 226 | healthd_enable_tricolor_led: { |
| 227 | cflags: ["-DHEALTHD_ENABLE_TRICOLOR_LED"], |
| 228 | }, |
| 229 | }, |
| 230 | } |
| 231 | |
| 232 | soong_config_module_type { |
| 233 | name: "vold_hw_fde", |
| 234 | module_type: "cc_defaults", |
| 235 | config_namespace: "omniQcomVars", |
| 236 | bool_variables: ["supports_hw_fde"], |
| 237 | properties: [ |
| 238 | "cflags", |
| 239 | "header_libs", |
| 240 | "shared_libs", |
| 241 | ], |
| 242 | } |
| 243 | |
| 244 | vold_hw_fde { |
| 245 | name: "vold_hw_fde_defaults", |
| 246 | soong_config_variables: { |
| 247 | supports_hw_fde: { |
| 248 | cflags: ["-DCONFIG_HW_DISK_ENCRYPTION"], |
| 249 | header_libs: ["libcryptfs_hw_headers"], |
| 250 | shared_libs: ["libcryptfs_hw"], |
| 251 | }, |
| 252 | }, |
| 253 | } |
| 254 | |
| 255 | soong_config_module_type { |
| 256 | name: "vold_hw_fde_perf", |
| 257 | module_type: "cc_defaults", |
| 258 | config_namespace: "omniQcomVars", |
| 259 | bool_variables: ["supports_hw_fde_perf"], |
| 260 | properties: [ |
| 261 | "cflags", |
| 262 | "shared_libs", |
| 263 | ], |
| 264 | } |
| 265 | |
| 266 | vold_hw_fde_perf { |
| 267 | name: "vold_hw_fde_perf_defaults", |
| 268 | soong_config_variables: { |
| 269 | supports_hw_fde_perf: { |
| 270 | cflags: ["-DCONFIG_HW_DISK_ENCRYPT_PERF"], |
| 271 | shared_libs: ["libcryptfs_hw"], |
| 272 | }, |
| 273 | }, |
| 274 | } |