# Copyright (C) 2020 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License.
# This file defines the Soong Config Variable namespace ANDROID, and also any # variables in that namespace.
# The expectation is that no vendor should be using the ANDROID namespace. This # check ensures that we don't collide with any existing vendor usage.
ifdef SOONG_CONFIG_ANDROID
$(error The Soong config namespace ANDROID is reserved.) endif
# PRODUCT_PRECOMPILED_SEPOLICY defaults to true. Explicitly check if it's "false" or not.
$(call soong_config_set_bool,ANDROID,PRODUCT_PRECOMPILED_SEPOLICY,$(if $(filter false,$(PRODUCT_PRECOMPILED_SEPOLICY)),false,true))
# For art modules
$(call soong_config_set_bool,art_module,host_prefer_32_bit,$(if $(filter true,$(HOST_PREFER_32_BIT)),true,false))
ifdef ART_DEBUG_OPT_FLAG
$(call soong_config_set,art_module,art_debug_opt_flag,$(ART_DEBUG_OPT_FLAG)) endif # The default value of ART_BUILD_HOST_DEBUG is true
$(call soong_config_set_bool,art_module,art_build_host_debug,$(if $(filter false,$(ART_BUILD_HOST_DEBUG)),false,true))
$(call soong_config_set_bool,art_module,art_use_simulator,$(ART_USE_SIMULATOR))
# For ART_BUILD_TARGET in art/build/Android.common_build.mk # Sets 'art_module_build_target' to true unless both NDEBUG and DEBUG variables are explicitly 'false'.
$(call soong_config_set_bool,art_module,art_build_target, \
$(if $(filter-out false_marker,$(ART_BUILD_TARGET_NDEBUG)_marker $(ART_BUILD_TARGET_DEBUG)_marker),true,false)) # For ART_BUILD_HOST in art/build/Android.common_build.mk # Sets 'art_module_build_host' to true unless both NDEBUG and DEBUG variables are explicitly 'false'.
$(call soong_config_set_bool,art_module,art_build_host, \
$(if $(filter-out false_marker,$(ART_BUILD_HOST_NDEBUG)_marker $(ART_BUILD_HOST_DEBUG)_marker),true,false))
# Enable AVF remote attestation if PRODUCT_AVF_REMOTE_ATTESTATION_DISABLED is not set to true explicitly. ifneq (true,$(PRODUCT_AVF_REMOTE_ATTESTATION_DISABLED))
$(call add_soong_config_var_value,ANDROID,avf_remote_attestation_enabled,true) endif
ifdef PRODUCT_AVF_MICRODROID_PAGE_REPORTING_ORDER ifeq ($(filter $(PRODUCT_AVF_MICRODROID_PAGE_REPORTING_ORDER),012345678910),)
$(error PRODUCT_AVF_MICRODROID_PAGE_REPORTING_ORDER must be between 0 and 10, got $(PRODUCT_AVF_MICRODROID_PAGE_REPORTING_ORDER)) endif
$(call add_soong_config_var_value,ANDROID,avf_microdroid_page_reporting_order,$(PRODUCT_AVF_MICRODROID_PAGE_REPORTING_ORDER)) endif
$(call add_soong_config_var_value,ANDROID,release_avf_allow_preinstalled_apps,$(RELEASE_AVF_ALLOW_PREINSTALLED_APPS))
$(call add_soong_config_var_value,ANDROID,release_avf_enable_device_assignment,$(RELEASE_AVF_ENABLE_DEVICE_ASSIGNMENT))
$(call add_soong_config_var_value,ANDROID,release_avf_enable_dice_changes,$(RELEASE_AVF_ENABLE_DICE_CHANGES))
$(call add_soong_config_var_value,ANDROID,release_avf_enable_early_vm,$(RELEASE_AVF_ENABLE_EARLY_VM))
$(call add_soong_config_var_value,ANDROID,release_avf_enable_llpvm_changes,$(RELEASE_AVF_ENABLE_LLPVM_CHANGES))
$(call add_soong_config_var_value,ANDROID,release_avf_enable_multi_tenant_microdroid_vm,$(RELEASE_AVF_ENABLE_MULTI_TENANT_MICRODROID_VM))
$(call add_soong_config_var_value,ANDROID,release_avf_enable_network,$(RELEASE_AVF_ENABLE_NETWORK)) # TODO(b/341292601): This flag is needed until the V release. We with clean it up after V together # with most of the release_avf_ flags here.
$(call add_soong_config_var_value,ANDROID,release_avf_enable_vendor_modules,$(RELEASE_AVF_ENABLE_VENDOR_MODULES))
$(call add_soong_config_var_value,ANDROID,release_avf_enable_virt_cpufreq,$(RELEASE_AVF_ENABLE_VIRT_CPUFREQ))
$(call add_soong_config_var_value,ANDROID,release_avf_microdroid_kernel_version,$(RELEASE_AVF_MICRODROID_KERNEL_VERSION))
$(call add_soong_config_var_value,ANDROID,release_avf_support_custom_vm_with_paravirtualized_devices,$(RELEASE_AVF_SUPPORT_CUSTOM_VM_WITH_PARAVIRTUALIZED_DEVICES))
$(call add_soong_config_var_value,ANDROID,release_selinux_data_data_ignore,$(RELEASE_SELINUX_DATA_DATA_IGNORE)) ifneq (,$(filter eng userdebug,$(TARGET_BUILD_VARIANT))) # write appcompat system properties on userdebug and eng builds
$(call add_soong_config_var_value,ANDROID,release_write_appcompat_override_system_properties,true) endif
# Enable system_server optimizations by default unless explicitly set or if # there may be dependent runtime jars. # TODO(b/240588226): Remove the off-by-default exceptions after handling # system_server jars automatically w/ R8. ifeq (true,$(PRODUCT_BROKEN_SUBOPTIMAL_ORDER_OF_SYSTEM_SERVER_JARS)) # If system_server jar ordering is broken, don't assume services.jar can be # safely optimized in isolation, as there may be dependent jars.
SYSTEM_OPTIMIZE_JAVA ?= false elseifneq (platform:services,$(lastword $(PRODUCT_SYSTEM_SERVER_JARS))) # If services is not the final jar in the dependency ordering, don't assume # it can be safely optimized in isolation, as there may be dependent jars. # TODO(b/212737576): Remove this exception after integrating use of `$(system_server_trace_refs)`.
SYSTEM_OPTIMIZE_JAVA ?= false else
SYSTEM_OPTIMIZE_JAVA ?= true endif
ifeq (true, $(SYSTEM_OPTIMIZE_JAVA)) # Create a list of (non-prefixed) system server jars that follow `services` in # the classpath. This can be used when optimizing `services` to trace any # downstream references that need keeping. # Example: "foo:service1 platform:services bar:services2" -> "services2"
system_server_jars_dependent_on_services := $(shell \ echo"$(PRODUCT_SYSTEM_SERVER_JARS)" | \
awk '{found=0; for(i=1;i<=NF;i++){if($$i=="platform:services"){found=1; continue} if(found){split($$i,a,":"); print a[2]}}}' | \
xargs) ifneq ($(strip $(system_server_jars_dependent_on_services)),)
$(call soong_config_set_string_list,ANDROID,system_server_trace_refs,$(system_server_jars_dependent_on_services)) endif endif
# TODO(b/319697968): Remove this build flag support when metalava fully supports flagged api
$(call soong_config_set,ANDROID,release_hidden_api_exportable_stubs,$(RELEASE_HIDDEN_API_EXPORTABLE_STUBS))
# Add nfc build flag to soong ifneq ($(RELEASE_PACKAGE_NFC_STACK),NfcNci)
$(call soong_config_set,bootclasspath,nfc_apex_bootclasspath_fragment,true) endif
# Add uwb build flag to soong
$(call soong_config_set,bootclasspath,release_ranging_stack,$(RELEASE_RANGING_STACK))
# Add ondeviceintelligence module build flag to soong ifeq (true,$(RELEASE_ONDEVICE_INTELLIGENCE_MODULE))
$(call soong_config_set,ANDROID,release_ondevice_intelligence_module,true) # Required as platform_bootclasspath is using this namespace
$(call soong_config_set,bootclasspath,release_ondevice_intelligence_module,true)
# Add RELEASE_DEPRECATE_RUNTIME_APEX to soong
$(call soong_config_set_bool,ANDROID,release_deprecate_runtime_apex,$(RELEASE_DEPRECATE_RUNTIME_APEX))
# Add uprobestats build flags to soong
$(call soong_config_set,ANDROID,release_uprobestats_bridge_service,$(RELEASE_UPROBESTATS_BRIDGE_SERVICE))
$(call soong_config_set,bootclasspath,release_uprobestats_bridge_service,$(RELEASE_UPROBESTATS_BRIDGE_SERVICE)) # Add uprobestats file move flags to soong, for both platform and module ifeq (true,$(RELEASE_UPROBESTATS_FILE_MOVE))
$(call soong_config_set,ANDROID,uprobestats_files_in_module,true)
$(call soong_config_set,ANDROID,uprobestats_files_in_platform,false) else
$(call soong_config_set,ANDROID,uprobestats_files_in_module,false)
$(call soong_config_set,ANDROID,uprobestats_files_in_platform,true) endif
# Enable Profiling module. Also used by platform_bootclasspath.
$(call soong_config_set,ANDROID,release_package_profiling_module,$(RELEASE_PACKAGE_PROFILING_MODULE))
$(call soong_config_set,bootclasspath,release_package_profiling_module,$(RELEASE_PACKAGE_PROFILING_MODULE))
# Enable anomaly detector inside the Profiling module. Also used by platform_bootclasspath.
$(call soong_config_set,ANDROID,release_anomaly_detector,$(RELEASE_ANOMALY_DETECTOR))
$(call soong_config_set,bootclasspath,release_anomaly_detector,$(RELEASE_ANOMALY_DETECTOR))
# Move Telecom APIs into telephonycore; used by both platform and module
$(call soong_config_set,ANDROID,release_telecom_mainline_module,$(RELEASE_TELECOM_MAINLINE_MODULE))
# Add telephony build flag to soong
$(call soong_config_set,ANDROID,release_telephony_module,$(RELEASE_TELEPHONY_MODULE))
$(call soong_config_set,bootclasspath,release_telephony_module,$(RELEASE_TELEPHONY_MODULE))
# Add npumanager build flag to soong
$(call soong_config_set,ANDROID,release_npumanager_module,$(RELEASE_NPUMANAGER_MODULE))
$(call soong_config_set,bootclasspath,release_npumanager_module,$(RELEASE_NPUMANAGER_MODULE))
# Add webapp build flag to soong
$(call soong_config_set,ANDROID,release_webapp_module,$(RELEASE_WEBAPP_MODULE))
$(call soong_config_set,bootclasspath,release_webapp_module,$(RELEASE_WEBAPP_MODULE))
# Add bettertogether build flag to soong
$(call soong_config_set,ANDROID,release_bettertogether_module,$(RELEASE_BETTERTOGETHER_MODULE))
$(call soong_config_set,bootclasspath,release_bettertogether_module,$(RELEASE_BETTERTOGETHER_MODULE))
# Add perf-setup build flag to soong # Note: BOARD_PERFSETUP_SCRIPT location must be under platform_testing/scripts/perf-setup/.
ifdef BOARD_PERFSETUP_SCRIPT
$(call soong_config_set,perf,board_perfsetup_script,$(notdir $(BOARD_PERFSETUP_SCRIPT))) endif
# Add target_use_pan_display flag for hardware/libhardware:gralloc.default
$(call soong_config_set_bool,gralloc,target_use_pan_display,$(if $(filter true,$(TARGET_USE_PAN_DISPLAY)),true,false))
# Add use_camera_v4l2_hal flag for hardware/libhardware/modules/camera/3_4:camera.v4l2
$(call soong_config_set_bool,camera,use_camera_v4l2_hal,$(if $(filter true,$(USE_CAMERA_V4L2_HAL)),true,false))
# Add audioserver_multilib flag for hardware/interfaces/soundtrigger/2.0/default:android.hardware.soundtrigger@2.0-impl ifneq ($(strip $(AUDIOSERVER_MULTILIB)),)
$(call soong_config_set,soundtrigger,audioserver_multilib,$(AUDIOSERVER_MULTILIB)) endif
# Add sim_count, disable_rild_oem_hook, and use_aosp_rild flag for ril related modules
$(call soong_config_set,ril,sim_count,$(SIM_COUNT)) ifneq ($(DISABLE_RILD_OEM_HOOK), false)
$(call soong_config_set_bool,ril,disable_rild_oem_hook,true) endif ifneq ($(ENABLE_VENDOR_RIL_SERVICE), true)
$(call soong_config_set_bool,ril,use_aosp_rild,true) endif
# Export target_board_platform to soong for hardware/google/graphics/common/libmemtrack:memtrack.$(TARGET_BOARD_PLATFORM)
$(call soong_config_set,ANDROID,target_board_platform,$(TARGET_BOARD_PLATFORM))
# Export board_uses_scaler_m2m1shot and board_uses_align_restriction to soong for hardware/google/graphics/common/libscaler:libexynosscaler
$(call soong_config_set_bool,google_graphics,board_uses_scaler_m2m1shot,$(if $(filter true,$(BOARD_USES_SCALER_M2M1SHOT)),true,false))
$(call soong_config_set_bool,google_graphics,board_uses_align_restriction,$(if $(filter true,$(BOARD_USES_ALIGN_RESTRICTION)),true,false))
# Export related variables to soong for hardware/google/graphics/common/libacryl:libacryl
ifdef BOARD_LIBACRYL_DEFAULT_COMPOSITOR
$(call soong_config_set,acryl,libacryl_default_compositor,$(BOARD_LIBACRYL_DEFAULT_COMPOSITOR)) endif
ifdef BOARD_LIBACRYL_DEFAULT_SCALER
$(call soong_config_set,acryl,libacryl_default_scaler,$(BOARD_LIBACRYL_DEFAULT_SCALER)) endif
ifdef BOARD_LIBACRYL_DEFAULT_BLTER
$(call soong_config_set,acryl,libacryl_default_blter,$(BOARD_LIBACRYL_DEFAULT_BLTER)) endif
ifdef BOARD_LIBACRYL_G2D_HDR_PLUGIN #BOARD_LIBACRYL_G2D_HDR_PLUGIN is set in each board config
$(call soong_config_set_bool,acryl,libacryl_use_g2d_hdr_plugin,true) endif
# Variables for hwcomposer.$(TARGET_BOARD_PLATFORM)
$(call soong_config_set_bool,google_graphics,board_uses_hwc_services,$(if $(filter true,$(BOARD_USES_HWC_SERVICES)),true,false))
# Variables for controlling android.hardware.composer.hwc3-service.pixel
$(call soong_config_set,google_graphics,board_hwc_version,$(BOARD_HWC_VERSION))
# Flag ExcludeExtractApk is to support "extract_apk" property for the following conditions. ifneq ($(WITH_DEXPREOPT),true)
$(call soong_config_set_bool,PrebuiltGmsCore,ExcludeExtractApk,true) endif ifeq ($(DONT_DEXPREOPT_PREBUILTS),true)
$(call soong_config_set_bool,PrebuiltGmsCore,ExcludeExtractApk,true) endif ifeq ($(WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY),true)
$(call soong_config_set_bool,PrebuiltGmsCore,ExcludeExtractApk,true) endif
# Variables for extra branches # TODO(b/383238397): Use bootstrap_go_package to enable extra flags.
-include vendor/google/build/extra_soong_config_vars.mk
# Variable for CI test packages ifneq ($(filter arm x86 true,$(TARGET_ARCH) $(TARGET_2ND_ARCH) $(TARGET_ENABLE_MEDIADRM_64)),)
$(call soong_config_set_bool,ci_tests,uses_widevine_tests, true) endif
# Flags used in GTVS_GTV prebuilt apps
$(call soong_config_set_bool,GTVS_GTV,PRODUCT_USE_PREBUILT_GTVS_GTV,$(if $(findstring $(PRODUCT_USE_PREBUILT_GTVS_GTV),true yes),true,false))
# Check modules to be built in "otatools-package". ifneq ($(wildcard vendor/google/tools/build_mixed_kernels_ramdisk),)
$(call soong_config_set_bool,otatools,use_build_mixed_kernels_ramdisk,true) endif ifneq ($(wildcard bootable/deprecated-ota/applypatch),)
$(call soong_config_set_bool,otatools,use_bootable_deprecated_ota_applypatch,true) endif
# Flags used in building continuous_native_tests ifeq ($(BOARD_IS_AUTOMOTIVE), true)
$(call soong_config_set_bool,ANDROID,board_is_automotive,true) endif ifneq ($(filter vendor/google/darwinn,$(PRODUCT_SOONG_NAMESPACES)),)
$(call soong_config_set_bool,ci_tests,uses_darwinn_tests,true) endif
# Flags used in building continuous_instrumentation_tests ifneq ($(filter StorageManager, $(PRODUCT_PACKAGES)),)
$(call soong_config_set_bool,ci_tests,uses_storage_manager_tests,true) endif
# Flag for building static_apexer_tools
$(call soong_config_set_bool,ANDROID,BUILD_HOST_static,$(if $(filter true 1,$(BUILD_HOST_static)),true,false))
# Flag for using SetupWizardCar certificate
$(call soong_config_set_bool,AUTO,USE_AUTOMTIVE_SETUPWIZARD_TEST_CERTIFICATE,$(if$(filter true,$(USE_AUTOMTIVE_SETUPWIZARD_TEST_CERTIFICATE)),true,false))
# This flag is used to control to use tools/tradefederation/core or # tools/tradefederation/prebuilts for tradefederation. ifeq (,$(wildcard tools/tradefederation/core))
$(call soong_config_set_bool,tradefed,use_prebuilt,true) else
$(call soong_config_set_bool,tradefed,use_prebuilt,false) endif
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.