• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2020 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# This file defines the Soong Config Variable namespace ANDROID, and also any
16# variables in that namespace.
17
18# The expectation is that no vendor should be using the ANDROID namespace. This
19# check ensures that we don't collide with any existing vendor usage.
20
21ifdef SOONG_CONFIG_ANDROID
22$(error The Soong config namespace ANDROID is reserved.)
23endif
24
25$(call add_soong_config_namespace,ANDROID)
26
27# Add variables to the namespace below:
28
29$(call add_soong_config_var,ANDROID,BOARD_USES_ODMIMAGE)
30$(call soong_config_set_bool,ANDROID,BOARD_USES_RECOVERY_AS_BOOT,$(BOARD_USES_RECOVERY_AS_BOOT))
31$(call soong_config_set_bool,ANDROID,BOARD_MOVE_GSI_AVB_KEYS_TO_VENDOR_BOOT,$(BOARD_MOVE_GSI_AVB_KEYS_TO_VENDOR_BOOT))
32$(call add_soong_config_var,ANDROID,CHECK_DEV_TYPE_VIOLATIONS)
33$(call soong_config_set_bool,ANDROID,HAS_BOARD_SYSTEM_EXT_PREBUILT_DIR,$(if $(BOARD_SYSTEM_EXT_PREBUILT_DIR),true,false))
34$(call soong_config_set_bool,ANDROID,HAS_BOARD_PRODUCT_PREBUILT_DIR,$(if $(BOARD_PRODUCT_PREBUILT_DIR),true,false))
35$(call add_soong_config_var,ANDROID,PLATFORM_SEPOLICY_VERSION)
36$(call add_soong_config_var,ANDROID,PLATFORM_SEPOLICY_COMPAT_VERSIONS)
37$(call add_soong_config_var,ANDROID,PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT)
38$(call soong_config_set_bool,ANDROID,RELEASE_BOARD_API_LEVEL_FROZEN,$(RELEASE_BOARD_API_LEVEL_FROZEN))
39$(call add_soong_config_var,ANDROID,TARGET_DYNAMIC_64_32_DRMSERVER)
40$(call add_soong_config_var,ANDROID,TARGET_ENABLE_MEDIADRM_64)
41$(call add_soong_config_var,ANDROID,TARGET_DYNAMIC_64_32_MEDIASERVER)
42$(call soong_config_set_bool,ANDROID,TARGET_SUPPORTS_32_BIT_APPS,$(if $(filter true,$(TARGET_SUPPORTS_32_BIT_APPS)),true,false))
43$(call soong_config_set_bool,ANDROID,TARGET_SUPPORTS_64_BIT_APPS,$(if $(filter true,$(TARGET_SUPPORTS_64_BIT_APPS)),true,false))
44$(call add_soong_config_var,ANDROID,BOARD_GENFS_LABELS_VERSION)
45$(call soong_config_set_bool,ANDROID,PRODUCT_FSVERITY_GENERATE_METADATA,$(if $(filter true,$(PRODUCT_FSVERITY_GENERATE_METADATA)),true,false))
46
47$(call add_soong_config_var,ANDROID,ADDITIONAL_M4DEFS,$(if $(BOARD_SEPOLICY_M4DEFS),$(addprefix -D,$(BOARD_SEPOLICY_M4DEFS))))
48$(call add_soong_config_var,ANDROID,TARGET_ADD_ROOT_EXTRA_VENDOR_SYMLINKS)
49
50# For BUILDING_GSI
51$(call soong_config_set_bool,gsi,building_gsi,$(if $(filter true,$(BUILDING_GSI)),true,false))
52
53# For bootable/recovery
54RECOVERY_API_VERSION := 3
55RECOVERY_FSTAB_VERSION := 2
56$(call soong_config_set, recovery, recovery_api_version, $(RECOVERY_API_VERSION))
57$(call soong_config_set, recovery, recovery_fstab_version, $(RECOVERY_FSTAB_VERSION))
58$(call soong_config_set_bool, recovery ,target_userimages_use_f2fs ,$(if $(TARGET_USERIMAGES_USE_F2FS),true,false))
59$(call soong_config_set_bool, recovery ,has_board_cacheimage_partition_size ,$(if $(BOARD_CACHEIMAGE_PARTITION_SIZE),true,false))
60ifdef TARGET_RECOVERY_UI_LIB
61  $(call soong_config_set_string_list, recovery, target_recovery_ui_lib, $(TARGET_RECOVERY_UI_LIB))
62endif
63
64# For Sanitizers
65$(call soong_config_set_bool,ANDROID,ASAN_ENABLED,$(if $(filter address,$(SANITIZE_TARGET)),true,false))
66$(call soong_config_set_bool,ANDROID,HWASAN_ENABLED,$(if $(filter hwaddress,$(SANITIZE_TARGET)),true,false))
67$(call soong_config_set_bool,ANDROID,SANITIZE_TARGET_SYSTEM_ENABLED,$(if $(filter true,$(SANITIZE_TARGET_SYSTEM)),true,false))
68
69# For init.environ.rc
70$(call soong_config_set_bool,ANDROID,GCOV_COVERAGE,$(NATIVE_COVERAGE))
71$(call soong_config_set_bool,ANDROID,CLANG_COVERAGE,$(CLANG_COVERAGE))
72$(call soong_config_set,ANDROID,SCUDO_ALLOCATION_RING_BUFFER_SIZE,$(PRODUCT_SCUDO_ALLOCATION_RING_BUFFER_SIZE))
73
74$(call soong_config_set_bool,ANDROID,EMMA_INSTRUMENT,$(if $(filter true,$(EMMA_INSTRUMENT)),true,false))
75
76# PRODUCT_PRECOMPILED_SEPOLICY defaults to true. Explicitly check if it's "false" or not.
77$(call soong_config_set_bool,ANDROID,PRODUCT_PRECOMPILED_SEPOLICY,$(if $(filter false,$(PRODUCT_PRECOMPILED_SEPOLICY)),false,true))
78
79# For art modules
80$(call soong_config_set_bool,art_module,host_prefer_32_bit,$(if $(filter true,$(HOST_PREFER_32_BIT)),true,false))
81ifdef ART_DEBUG_OPT_FLAG
82$(call soong_config_set,art_module,art_debug_opt_flag,$(ART_DEBUG_OPT_FLAG))
83endif
84# The default value of ART_BUILD_HOST_DEBUG is true
85$(call soong_config_set_bool,art_module,art_build_host_debug,$(if $(filter false,$(ART_BUILD_HOST_DEBUG)),false,true))
86
87# For chre
88$(call soong_config_set_bool,chre,chre_daemon_lpma_enabled,$(if $(filter true,$(CHRE_DAEMON_LPMA_ENABLED)),true,false))
89$(call soong_config_set_bool,chre,chre_dedicated_transport_channel_enabled,$(if $(filter true,$(CHRE_DEDICATED_TRANSPORT_CHANNEL_ENABLED)),true,false))
90$(call soong_config_set_bool,chre,chre_log_atom_extension_enabled,$(if $(filter true,$(CHRE_LOG_ATOM_EXTENSION_ENABLED)),true,false))
91$(call soong_config_set_bool,chre,building_vendor_image,$(if $(filter true,$(BUILDING_VENDOR_IMAGE)),true,false))
92$(call soong_config_set_bool,chre,chre_usf_daemon_enabled,$(if $(filter true,$(CHRE_USF_DAEMON_ENABLED)),true,false))
93
94ifdef TARGET_BOARD_AUTO
95  $(call add_soong_config_var_value, ANDROID, target_board_auto, $(TARGET_BOARD_AUTO))
96endif
97
98# Apex build mode variables
99ifdef APEX_BUILD_FOR_PRE_S_DEVICES
100$(call add_soong_config_var_value,ANDROID,library_linking_strategy,prefer_static)
101else
102ifdef KEEP_APEX_INHERIT
103$(call add_soong_config_var_value,ANDROID,library_linking_strategy,prefer_static)
104endif
105endif
106
107# Enable SystemUI optimizations by default unless explicitly set.
108SYSTEMUI_OPTIMIZE_JAVA ?= true
109$(call add_soong_config_var,ANDROID,SYSTEMUI_OPTIMIZE_JAVA)
110
111# Flag to use baseline profile for SystemUI.
112$(call soong_config_set,ANDROID,release_systemui_use_speed_profile,$(RELEASE_SYSTEMUI_USE_SPEED_PROFILE))
113
114# Flag for enabling compose for Launcher.
115$(call soong_config_set,ANDROID,release_enable_compose_in_launcher,$(RELEASE_ENABLE_COMPOSE_IN_LAUNCHER))
116
117ifdef PRODUCT_AVF_ENABLED
118$(call add_soong_config_var_value,ANDROID,avf_enabled,$(PRODUCT_AVF_ENABLED))
119endif
120
121# Enable AVF remote attestation according to the flag value if PRODUCT_AVF_REMOTE_ATTESTATION_DISABLED is not
122# set to true explicitly.
123ifneq (true,$(PRODUCT_AVF_REMOTE_ATTESTATION_DISABLED))
124  $(call add_soong_config_var_value,ANDROID,avf_remote_attestation_enabled,$(RELEASE_AVF_ENABLE_REMOTE_ATTESTATION))
125endif
126
127ifdef PRODUCT_AVF_MICRODROID_GUEST_GKI_VERSION
128$(call add_soong_config_var_value,ANDROID,avf_microdroid_guest_gki_version,$(PRODUCT_AVF_MICRODROID_GUEST_GKI_VERSION))
129endif
130
131ifdef TARGET_BOOTS_16K
132$(call soong_config_set_bool,ANDROID,target_boots_16k,$(filter true,$(TARGET_BOOTS_16K)))
133endif
134
135ifdef PRODUCT_CGROUP_V2_SYS_APP_ISOLATION_ENABLED
136$(call add_soong_config_var_value,ANDROID,cgroup_v2_sys_app_isolation,$(PRODUCT_CGROUP_V2_SYS_APP_ISOLATION_ENABLED))
137else
138$(call add_soong_config_var_value,ANDROID,cgroup_v2_sys_app_isolation,true)
139endif
140
141$(call add_soong_config_var_value,ANDROID,release_avf_allow_preinstalled_apps,$(RELEASE_AVF_ALLOW_PREINSTALLED_APPS))
142$(call add_soong_config_var_value,ANDROID,release_avf_enable_device_assignment,$(RELEASE_AVF_ENABLE_DEVICE_ASSIGNMENT))
143$(call add_soong_config_var_value,ANDROID,release_avf_enable_dice_changes,$(RELEASE_AVF_ENABLE_DICE_CHANGES))
144$(call add_soong_config_var_value,ANDROID,release_avf_enable_early_vm,$(RELEASE_AVF_ENABLE_EARLY_VM))
145$(call add_soong_config_var_value,ANDROID,release_avf_enable_llpvm_changes,$(RELEASE_AVF_ENABLE_LLPVM_CHANGES))
146$(call add_soong_config_var_value,ANDROID,release_avf_enable_multi_tenant_microdroid_vm,$(RELEASE_AVF_ENABLE_MULTI_TENANT_MICRODROID_VM))
147$(call add_soong_config_var_value,ANDROID,release_avf_enable_network,$(RELEASE_AVF_ENABLE_NETWORK))
148# TODO(b/341292601): This flag is needed until the V release. We with clean it up after V together
149# with most of the release_avf_ flags here.
150$(call add_soong_config_var_value,ANDROID,release_avf_enable_remote_attestation,$(RELEASE_AVF_ENABLE_REMOTE_ATTESTATION))
151$(call add_soong_config_var_value,ANDROID,release_avf_enable_vendor_modules,$(RELEASE_AVF_ENABLE_VENDOR_MODULES))
152$(call add_soong_config_var_value,ANDROID,release_avf_enable_virt_cpufreq,$(RELEASE_AVF_ENABLE_VIRT_CPUFREQ))
153$(call add_soong_config_var_value,ANDROID,release_avf_microdroid_kernel_version,$(RELEASE_AVF_MICRODROID_KERNEL_VERSION))
154$(call add_soong_config_var_value,ANDROID,release_avf_support_custom_vm_with_paravirtualized_devices,$(RELEASE_AVF_SUPPORT_CUSTOM_VM_WITH_PARAVIRTUALIZED_DEVICES))
155
156$(call add_soong_config_var_value,ANDROID,release_binder_death_recipient_weak_from_jni,$(RELEASE_BINDER_DEATH_RECIPIENT_WEAK_FROM_JNI))
157
158$(call add_soong_config_var_value,ANDROID,release_libpower_no_lock_binder_txn,$(RELEASE_LIBPOWER_NO_LOCK_BINDER_TXN))
159
160$(call add_soong_config_var_value,ANDROID,release_selinux_data_data_ignore,$(RELEASE_SELINUX_DATA_DATA_IGNORE))
161ifneq (,$(filter eng userdebug,$(TARGET_BUILD_VARIANT)))
162    # write appcompat system properties on userdebug and eng builds
163    $(call add_soong_config_var_value,ANDROID,release_write_appcompat_override_system_properties,true)
164endif
165
166# Enable system_server optimizations by default unless explicitly set or if
167# there may be dependent runtime jars.
168# TODO(b/240588226): Remove the off-by-default exceptions after handling
169# system_server jars automatically w/ R8.
170ifeq (true,$(PRODUCT_BROKEN_SUBOPTIMAL_ORDER_OF_SYSTEM_SERVER_JARS))
171  # If system_server jar ordering is broken, don't assume services.jar can be
172  # safely optimized in isolation, as there may be dependent jars.
173  SYSTEM_OPTIMIZE_JAVA ?= false
174else ifneq (platform:services,$(lastword $(PRODUCT_SYSTEM_SERVER_JARS)))
175  # If services is not the final jar in the dependency ordering, don't assume
176  # it can be safely optimized in isolation, as there may be dependent jars.
177  # TODO(b/212737576): Remove this exception after integrating use of `$(system_server_trace_refs)`.
178  SYSTEM_OPTIMIZE_JAVA ?= false
179else
180  SYSTEM_OPTIMIZE_JAVA ?= true
181endif
182
183ifeq (true,$(FULL_SYSTEM_OPTIMIZE_JAVA))
184  SYSTEM_OPTIMIZE_JAVA := true
185endif
186
187$(call add_soong_config_var,ANDROID,SYSTEM_OPTIMIZE_JAVA)
188$(call add_soong_config_var,ANDROID,FULL_SYSTEM_OPTIMIZE_JAVA)
189
190ifeq (true, $(SYSTEM_OPTIMIZE_JAVA))
191  # Create a list of (non-prefixed) system server jars that follow `services` in
192  # the classpath. This can be used when optimizing `services` to trace any
193  # downstream references that need keeping.
194  # Example: "foo:service1 platform:services bar:services2" -> "services2"
195  system_server_jars_dependent_on_services := $(shell \
196      echo "$(PRODUCT_SYSTEM_SERVER_JARS)" | \
197      awk '{found=0; for(i=1;i<=NF;i++){if($$i=="platform:services"){found=1; continue} if(found){split($$i,a,":"); print a[2]}}}' | \
198      xargs)
199  ifneq ($(strip $(system_server_jars_dependent_on_services)),)
200    $(call soong_config_set_string_list,ANDROID,system_server_trace_refs,$(system_server_jars_dependent_on_services))
201  endif
202endif
203
204# TODO(b/319697968): Remove this build flag support when metalava fully supports flagged api
205$(call soong_config_set,ANDROID,release_hidden_api_exportable_stubs,$(RELEASE_HIDDEN_API_EXPORTABLE_STUBS))
206
207# Check for SupplementalApi module.
208ifeq ($(wildcard packages/modules/SupplementalApi),)
209$(call add_soong_config_var_value,ANDROID,include_nonpublic_framework_api,false)
210else
211$(call add_soong_config_var_value,ANDROID,include_nonpublic_framework_api,true)
212endif
213
214# Add nfc build flag to soong
215ifneq ($(RELEASE_PACKAGE_NFC_STACK),NfcNci)
216  $(call soong_config_set,bootclasspath,nfc_apex_bootclasspath_fragment,true)
217endif
218
219# Add uwb build flag to soong
220$(call soong_config_set,bootclasspath,release_ranging_stack,$(RELEASE_RANGING_STACK))
221
222# Add crashrecovery build flag to soong
223$(call soong_config_set,ANDROID,release_crashrecovery_module,$(RELEASE_CRASHRECOVERY_MODULE))
224# Add crashrecovery file move flags to soong, for both platform and module
225ifeq (true,$(RELEASE_CRASHRECOVERY_FILE_MOVE))
226  $(call soong_config_set,ANDROID,crashrecovery_files_in_module,true)
227  $(call soong_config_set,ANDROID,crashrecovery_files_in_platform,false)
228else
229  $(call soong_config_set,ANDROID,crashrecovery_files_in_module,false)
230  $(call soong_config_set,ANDROID,crashrecovery_files_in_platform,true)
231endif
232# Required as platform_bootclasspath is using this namespace
233$(call soong_config_set,bootclasspath,release_crashrecovery_module,$(RELEASE_CRASHRECOVERY_MODULE))
234
235
236# Add ondeviceintelligence module build flag to soong
237ifeq (true,$(RELEASE_ONDEVICE_INTELLIGENCE_MODULE))
238    $(call soong_config_set,ANDROID,release_ondevice_intelligence_module,true)
239    # Required as platform_bootclasspath is using this namespace
240    $(call soong_config_set,bootclasspath,release_ondevice_intelligence_module,true)
241
242else
243    $(call soong_config_set,ANDROID,release_ondevice_intelligence_platform,true)
244    $(call soong_config_set,bootclasspath,release_ondevice_intelligence_platform,true)
245
246endif
247
248# Add uprobestats build flag to soong
249$(call soong_config_set,ANDROID,release_uprobestats_module,$(RELEASE_UPROBESTATS_MODULE))
250# Add uprobestats file move flags to soong, for both platform and module
251ifeq (true,$(RELEASE_UPROBESTATS_FILE_MOVE))
252  $(call soong_config_set,ANDROID,uprobestats_files_in_module,true)
253  $(call soong_config_set,ANDROID,uprobestats_files_in_platform,false)
254else
255  $(call soong_config_set,ANDROID,uprobestats_files_in_module,false)
256  $(call soong_config_set,ANDROID,uprobestats_files_in_platform,true)
257endif
258
259# Enable Profiling module. Also used by platform_bootclasspath.
260$(call soong_config_set,ANDROID,release_package_profiling_module,$(RELEASE_PACKAGE_PROFILING_MODULE))
261$(call soong_config_set,bootclasspath,release_package_profiling_module,$(RELEASE_PACKAGE_PROFILING_MODULE))
262
263# Move VCN from platform to the Tethering module; used by both platform and module
264$(call soong_config_set,ANDROID,is_vcn_in_mainline,$(RELEASE_MOVE_VCN_TO_MAINLINE))
265
266# Add perf-setup build flag to soong
267# Note: BOARD_PERFSETUP_SCRIPT location must be under platform_testing/scripts/perf-setup/.
268ifdef BOARD_PERFSETUP_SCRIPT
269  $(call soong_config_set,perf,board_perfsetup_script,$(notdir $(BOARD_PERFSETUP_SCRIPT)))
270endif
271
272# Add target_use_pan_display flag for hardware/libhardware:gralloc.default
273$(call soong_config_set_bool,gralloc,target_use_pan_display,$(if $(filter true,$(TARGET_USE_PAN_DISPLAY)),true,false))
274
275# Add use_camera_v4l2_hal flag for hardware/libhardware/modules/camera/3_4:camera.v4l2
276$(call soong_config_set_bool,camera,use_camera_v4l2_hal,$(if $(filter true,$(USE_CAMERA_V4L2_HAL)),true,false))
277
278# Add audioserver_multilib flag for hardware/interfaces/soundtrigger/2.0/default:android.hardware.soundtrigger@2.0-impl
279ifneq ($(strip $(AUDIOSERVER_MULTILIB)),)
280  $(call soong_config_set,soundtrigger,audioserver_multilib,$(AUDIOSERVER_MULTILIB))
281endif
282
283# Add sim_count, disable_rild_oem_hook, and use_aosp_rild flag for ril related modules
284$(call soong_config_set,ril,sim_count,$(SIM_COUNT))
285ifneq ($(DISABLE_RILD_OEM_HOOK), false)
286  $(call soong_config_set_bool,ril,disable_rild_oem_hook,true)
287endif
288ifneq ($(ENABLE_VENDOR_RIL_SERVICE), true)
289  $(call soong_config_set_bool,ril,use_aosp_rild,true)
290endif
291
292# Export target_board_platform to soong for hardware/google/graphics/common/libmemtrack:memtrack.$(TARGET_BOARD_PLATFORM)
293$(call soong_config_set,ANDROID,target_board_platform,$(TARGET_BOARD_PLATFORM))
294
295# Export board_uses_scaler_m2m1shot and board_uses_align_restriction to soong for hardware/google/graphics/common/libscaler:libexynosscaler
296$(call soong_config_set_bool,google_graphics,board_uses_scaler_m2m1shot,$(if $(filter true,$(BOARD_USES_SCALER_M2M1SHOT)),true,false))
297$(call soong_config_set_bool,google_graphics,board_uses_align_restriction,$(if $(filter true,$(BOARD_USES_ALIGN_RESTRICTION)),true,false))
298
299# Export related variables to soong for hardware/google/graphics/common/libacryl:libacryl
300ifdef BOARD_LIBACRYL_DEFAULT_COMPOSITOR
301  $(call soong_config_set,acryl,libacryl_default_compositor,$(BOARD_LIBACRYL_DEFAULT_COMPOSITOR))
302endif
303ifdef BOARD_LIBACRYL_DEFAULT_SCALER
304  $(call soong_config_set,acryl,libacryl_default_scaler,$(BOARD_LIBACRYL_DEFAULT_SCALER))
305endif
306ifdef BOARD_LIBACRYL_DEFAULT_BLTER
307  $(call soong_config_set,acryl,libacryl_default_blter,$(BOARD_LIBACRYL_DEFAULT_BLTER))
308endif
309ifdef BOARD_LIBACRYL_G2D_HDR_PLUGIN
310  #BOARD_LIBACRYL_G2D_HDR_PLUGIN is set in each board config
311  $(call soong_config_set_bool,acryl,libacryl_use_g2d_hdr_plugin,true)
312endif
313
314# Export related variables to soong for hardware/google/graphics/common/BoardConfigCFlags.mk
315$(call soong_config_set_bool,google_graphics,hwc_no_support_skip_validate,$(if $(filter true,$(HWC_NO_SUPPORT_SKIP_VALIDATE)),true,false))
316$(call soong_config_set_bool,google_graphics,hwc_support_color_transform,$(if $(filter true,$(HWC_SUPPORT_COLOR_TRANSFORM)),true,false))
317$(call soong_config_set_bool,google_graphics,hwc_support_render_intent,$(if $(filter true,$(HWC_SUPPORT_RENDER_INTENT)),true,false))
318$(call soong_config_set_bool,google_graphics,board_uses_virtual_display,$(if $(filter true,$(BOARD_USES_VIRTUAL_DISPLAY)),true,false))
319$(call soong_config_set_bool,google_graphics,board_uses_dt,$(if $(filter true,$(BOARD_USES_DT)),true,false))
320$(call soong_config_set_bool,google_graphics,board_uses_decon_64bit_address,$(if $(filter true,$(BOARD_USES_DECON_64BIT_ADDRESS)),true,false))
321$(call soong_config_set_bool,google_graphics,board_uses_hdrui_gles_conversion,$(if $(filter true,$(BOARD_USES_HDRUI_GLES_CONVERSION)),true,false))
322$(call soong_config_set_bool,google_graphics,uses_idisplay_intf_sec,$(if $(filter true,$(USES_IDISPLAY_INTF_SEC)),true,false))
323
324# Variables for fs_config
325$(call soong_config_set_bool,fs_config,vendor,$(if $(BOARD_USES_VENDORIMAGE)$(BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE),true,false))
326$(call soong_config_set_bool,fs_config,oem,$(if $(BOARD_USES_OEMIMAGE)$(BOARD_OEMIMAGE_FILE_SYSTEM_TYPE),true,false))
327$(call soong_config_set_bool,fs_config,odm,$(if $(BOARD_USES_ODMIMAGE)$(BOARD_ODMIMAGE_FILE_SYSTEM_TYPE),true,false))
328$(call soong_config_set_bool,fs_config,vendor_dlkm,$(if $(BOARD_USES_VENDOR_DLKMIMAGE)$(BOARD_VENDOR_DLKMIMAGE_FILE_SYSTEM_TYPE),true,false))
329$(call soong_config_set_bool,fs_config,odm_dlkm,$(if $(BOARD_USES_ODM_DLKMIMAGE)$(BOARD_ODM_DLKMIMAGE_FILE_SYSTEM_TYPE),true,false))
330$(call soong_config_set_bool,fs_config,system_dlkm,$(if $(BOARD_USES_SYSTEM_DLKMIMAGE)$(BOARD_SYSTEM_DLKMIMAGE_FILE_SYSTEM_TYPE),true,false))
331
332# Variables for telephony
333$(call soong_config_set_bool,telephony,sec_cp_secure_boot,$(if $(filter true,$(SEC_CP_SECURE_BOOT)),true,false))
334$(call soong_config_set_bool,telephony,cbd_protocol_sit,$(if $(filter true,$(CBD_PROTOCOL_SIT)),true,false))
335$(call soong_config_set_bool,telephony,use_radioexternal_hal_aidl,$(if $(filter true,$(USE_RADIOEXTERNAL_HAL_AIDL)),true,false))
336
337# Variables for hwcomposer.$(TARGET_BOARD_PLATFORM)
338$(call soong_config_set_bool,google_graphics,board_uses_hwc_services,$(if $(filter true,$(BOARD_USES_HWC_SERVICES)),true,false))
339
340# Variables for controlling android.hardware.composer.hwc3-service.pixel
341$(call soong_config_set,google_graphics,board_hwc_version,$(BOARD_HWC_VERSION))
342
343# Flag ExcludeExtractApk is to support "extract_apk" property for the following conditions.
344ifneq ($(WITH_DEXPREOPT),true)
345  $(call soong_config_set_bool,PrebuiltGmsCore,ExcludeExtractApk,true)
346endif
347ifeq ($(DONT_DEXPREOPT_PREBUILTS),true)
348  $(call soong_config_set_bool,PrebuiltGmsCore,ExcludeExtractApk,true)
349endif
350ifeq ($(WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY),true)
351  $(call soong_config_set_bool,PrebuiltGmsCore,ExcludeExtractApk,true)
352endif
353
354# Variables for extra branches
355# TODO(b/383238397): Use bootstrap_go_package to enable extra flags.
356-include vendor/google/build/extra_soong_config_vars.mk
357
358# Variable for CI test packages
359ifneq ($(filter arm x86 true,$(TARGET_ARCH) $(TARGET_2ND_ARCH) $(TARGET_ENABLE_MEDIADRM_64)),)
360  $(call soong_config_set_bool,ci_tests,uses_widevine_tests, true)
361endif
362
363# Flags used in GTVS prebuilt apps
364$(call soong_config_set_bool,GTVS,GTVS_COMPRESSED_PREBUILTS,$(if $(findstring $(GTVS_COMPRESSED_PREBUILTS),true yes),true,false))
365$(call soong_config_set_bool,GTVS,GTVS_GMSCORE_BETA,$(if $(findstring $(GTVS_GMSCORE_BETA),true yes),true,false))
366$(call soong_config_set_bool,GTVS,GTVS_SETUPWRAITH_BETA,$(if $(findstring $(GTVS_SETUPWRAITH_BETA),true yes),true,false))
367$(call soong_config_set_bool,GTVS,PRODUCT_USE_PREBUILT_GTVS,$(if $(findstring $(PRODUCT_USE_PREBUILT_GTVS),true yes),true,false))
368
369# Flags used in GTVS_GTV prebuilt apps
370$(call soong_config_set_bool,GTVS_GTV,PRODUCT_USE_PREBUILT_GTVS_GTV,$(if $(findstring $(PRODUCT_USE_PREBUILT_GTVS_GTV),true yes),true,false))
371
372# Check modules to be built in "otatools-package".
373ifneq ($(wildcard vendor/google/tools/build_mixed_kernels_ramdisk),)
374  $(call soong_config_set_bool,otatools,use_build_mixed_kernels_ramdisk,true)
375endif
376ifneq ($(wildcard bootable/deprecated-ota/applypatch),)
377  $(call soong_config_set_bool,otatools,use_bootable_deprecated_ota_applypatch,true)
378endif
379