2016-11-10 09:22:15 +08:00
|
|
|
SOONG_MAKEVARS_MK := $(SOONG_OUT_DIR)/make_vars-$(TARGET_PRODUCT).mk
|
|
|
|
SOONG_VARIABLES := $(SOONG_OUT_DIR)/soong.variables
|
|
|
|
SOONG_ANDROID_MK := $(SOONG_OUT_DIR)/Android-$(TARGET_PRODUCT).mk
|
|
|
|
|
|
|
|
BINDER32BIT :=
|
|
|
|
ifneq ($(TARGET_USES_64_BIT_BINDER),true)
|
|
|
|
ifneq ($(TARGET_IS_64_BIT),true)
|
|
|
|
BINDER32BIT := true
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2018-11-17 13:26:33 +08:00
|
|
|
include $(BUILD_SYSTEM)/dex_preopt_config.mk
|
2017-10-13 06:26:29 +08:00
|
|
|
|
2018-11-17 13:26:33 +08:00
|
|
|
ifeq ($(WRITE_SOONG_VARIABLES),true)
|
2018-12-15 03:49:49 +08:00
|
|
|
|
2016-11-10 09:22:15 +08:00
|
|
|
# Create soong.variables with copies of makefile settings. Runs every build,
|
|
|
|
# but only updates soong.variables if it changes
|
2017-10-13 06:26:29 +08:00
|
|
|
$(shell mkdir -p $(dir $(SOONG_VARIABLES)))
|
2018-11-11 13:48:59 +08:00
|
|
|
$(call json_start)
|
2017-10-13 06:26:29 +08:00
|
|
|
|
|
|
|
$(call add_json_str, Make_suffix, -$(TARGET_PRODUCT))
|
|
|
|
|
2018-01-11 03:40:14 +08:00
|
|
|
$(call add_json_str, BuildId, $(BUILD_ID))
|
2020-02-22 09:29:37 +08:00
|
|
|
$(call add_json_str, BuildNumberFile, build_number.txt)
|
2018-01-11 03:40:14 +08:00
|
|
|
|
2018-05-10 02:10:15 +08:00
|
|
|
$(call add_json_str, Platform_version_name, $(PLATFORM_VERSION))
|
2017-10-13 06:26:29 +08:00
|
|
|
$(call add_json_val, Platform_sdk_version, $(PLATFORM_SDK_VERSION))
|
2018-04-19 03:40:16 +08:00
|
|
|
$(call add_json_str, Platform_sdk_codename, $(PLATFORM_VERSION_CODENAME))
|
|
|
|
$(call add_json_bool, Platform_sdk_final, $(filter REL,$(PLATFORM_VERSION_CODENAME)))
|
2017-10-13 06:26:29 +08:00
|
|
|
$(call add_json_csv, Platform_version_active_codenames, $(PLATFORM_VERSION_ALL_CODENAMES))
|
2019-04-03 13:57:43 +08:00
|
|
|
$(call add_json_str, Platform_security_patch, $(PLATFORM_SECURITY_PATCH))
|
|
|
|
$(call add_json_str, Platform_preview_sdk_version, $(PLATFORM_PREVIEW_SDK_VERSION))
|
|
|
|
$(call add_json_str, Platform_base_os, $(PLATFORM_BASE_OS))
|
|
|
|
|
|
|
|
$(call add_json_str, Platform_min_supported_target_sdk_version, $(PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION))
|
2017-10-13 06:26:29 +08:00
|
|
|
|
2021-03-24 13:20:33 +08:00
|
|
|
$(call add_json_bool, Allow_missing_dependencies, $(filter true,$(ALLOW_MISSING_DEPENDENCIES)))
|
2020-06-04 22:16:39 +08:00
|
|
|
$(call add_json_bool, Unbundled_build, $(TARGET_BUILD_UNBUNDLED))
|
2020-06-17 08:30:16 +08:00
|
|
|
$(call add_json_bool, Unbundled_build_apps, $(TARGET_BUILD_APPS))
|
2020-07-08 17:10:38 +08:00
|
|
|
$(call add_json_bool, Always_use_prebuilt_sdks, $(TARGET_BUILD_USE_PREBUILT_SDKS))
|
2020-10-29 02:44:52 +08:00
|
|
|
$(call add_json_bool, Skip_boot_jars_check, $(SKIP_BOOT_JARS_CHECK))
|
2017-10-13 06:26:29 +08:00
|
|
|
|
|
|
|
$(call add_json_bool, Debuggable, $(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
|
|
|
|
$(call add_json_bool, Eng, $(filter eng,$(TARGET_BUILD_VARIANT)))
|
|
|
|
|
|
|
|
$(call add_json_str, DeviceName, $(TARGET_DEVICE))
|
|
|
|
$(call add_json_str, DeviceArch, $(TARGET_ARCH))
|
|
|
|
$(call add_json_str, DeviceArchVariant, $(TARGET_ARCH_VARIANT))
|
|
|
|
$(call add_json_str, DeviceCpuVariant, $(TARGET_CPU_VARIANT))
|
|
|
|
$(call add_json_list, DeviceAbi, $(TARGET_CPU_ABI) $(TARGET_CPU_ABI2))
|
|
|
|
|
|
|
|
$(call add_json_str, DeviceSecondaryArch, $(TARGET_2ND_ARCH))
|
|
|
|
$(call add_json_str, DeviceSecondaryArchVariant, $(TARGET_2ND_ARCH_VARIANT))
|
|
|
|
$(call add_json_str, DeviceSecondaryCpuVariant, $(TARGET_2ND_CPU_VARIANT))
|
|
|
|
$(call add_json_list, DeviceSecondaryAbi, $(TARGET_2ND_CPU_ABI) $(TARGET_2ND_CPU_ABI2))
|
|
|
|
|
2020-11-27 18:35:17 +08:00
|
|
|
$(call add_json_bool, Aml_abis, $(if $(filter mainline_sdk,$(TARGET_ARCH_SUITE)),true))
|
|
|
|
$(call add_json_bool, Ndk_abis, $(if $(filter ndk, $(TARGET_ARCH_SUITE)),true))
|
|
|
|
|
2019-04-02 16:50:11 +08:00
|
|
|
$(call add_json_str, NativeBridgeArch, $(TARGET_NATIVE_BRIDGE_ARCH))
|
|
|
|
$(call add_json_str, NativeBridgeArchVariant, $(TARGET_NATIVE_BRIDGE_ARCH_VARIANT))
|
|
|
|
$(call add_json_str, NativeBridgeCpuVariant, $(TARGET_NATIVE_BRIDGE_CPU_VARIANT))
|
|
|
|
$(call add_json_list, NativeBridgeAbi, $(TARGET_NATIVE_BRIDGE_ABI))
|
2019-07-10 17:08:58 +08:00
|
|
|
$(call add_json_str, NativeBridgeRelativePath, $(TARGET_NATIVE_BRIDGE_RELATIVE_PATH))
|
2019-04-02 16:50:11 +08:00
|
|
|
|
|
|
|
$(call add_json_str, NativeBridgeSecondaryArch, $(TARGET_NATIVE_BRIDGE_2ND_ARCH))
|
|
|
|
$(call add_json_str, NativeBridgeSecondaryArchVariant, $(TARGET_NATIVE_BRIDGE_2ND_ARCH_VARIANT))
|
|
|
|
$(call add_json_str, NativeBridgeSecondaryCpuVariant, $(TARGET_NATIVE_BRIDGE_2ND_CPU_VARIANT))
|
|
|
|
$(call add_json_list, NativeBridgeSecondaryAbi, $(TARGET_NATIVE_BRIDGE_2ND_ABI))
|
2019-07-10 17:08:58 +08:00
|
|
|
$(call add_json_str, NativeBridgeSecondaryRelativePath, $(TARGET_NATIVE_BRIDGE_2ND_RELATIVE_PATH))
|
2019-04-02 16:50:11 +08:00
|
|
|
|
2017-10-13 06:26:29 +08:00
|
|
|
$(call add_json_str, HostArch, $(HOST_ARCH))
|
|
|
|
$(call add_json_str, HostSecondaryArch, $(HOST_2ND_ARCH))
|
|
|
|
$(call add_json_bool, HostStaticBinaries, $(BUILD_HOST_static))
|
|
|
|
|
|
|
|
$(call add_json_str, CrossHost, $(HOST_CROSS_OS))
|
|
|
|
$(call add_json_str, CrossHostArch, $(HOST_CROSS_ARCH))
|
|
|
|
$(call add_json_str, CrossHostSecondaryArch, $(HOST_CROSS_2ND_ARCH))
|
|
|
|
|
2019-03-19 01:59:27 +08:00
|
|
|
$(call add_json_list, DeviceResourceOverlays, $(DEVICE_PACKAGE_OVERLAYS))
|
|
|
|
$(call add_json_list, ProductResourceOverlays, $(PRODUCT_PACKAGE_OVERLAYS))
|
2017-10-31 08:31:44 +08:00
|
|
|
$(call add_json_list, EnforceRROTargets, $(PRODUCT_ENFORCE_RRO_TARGETS))
|
|
|
|
$(call add_json_list, EnforceRROExcludedOverlays, $(PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS))
|
|
|
|
|
|
|
|
$(call add_json_str, AAPTCharacteristics, $(TARGET_AAPT_CHARACTERISTICS))
|
|
|
|
$(call add_json_list, AAPTConfig, $(PRODUCT_AAPT_CONFIG))
|
|
|
|
$(call add_json_str, AAPTPreferredConfig, $(PRODUCT_AAPT_PREF_CONFIG))
|
|
|
|
$(call add_json_list, AAPTPrebuiltDPI, $(PRODUCT_AAPT_PREBUILT_DPI))
|
|
|
|
|
2017-12-02 09:13:56 +08:00
|
|
|
$(call add_json_str, DefaultAppCertificate, $(PRODUCT_DEFAULT_DEV_CERTIFICATE))
|
|
|
|
|
2017-10-31 08:31:44 +08:00
|
|
|
$(call add_json_str, AppsDefaultVersionName, $(APPS_DEFAULT_VERSION_NAME))
|
|
|
|
|
2017-10-13 06:26:29 +08:00
|
|
|
$(call add_json_list, SanitizeHost, $(SANITIZE_HOST))
|
|
|
|
$(call add_json_list, SanitizeDevice, $(SANITIZE_TARGET))
|
|
|
|
$(call add_json_list, SanitizeDeviceDiag, $(SANITIZE_TARGET_DIAG))
|
|
|
|
$(call add_json_list, SanitizeDeviceArch, $(SANITIZE_TARGET_ARCH))
|
|
|
|
|
|
|
|
$(call add_json_bool, Safestack, $(filter true,$(USE_SAFESTACK)))
|
|
|
|
$(call add_json_bool, EnableCFI, $(call invert_bool,$(filter false,$(ENABLE_CFI))))
|
2017-10-31 17:25:16 +08:00
|
|
|
$(call add_json_list, CFIExcludePaths, $(CFI_EXCLUDE_PATHS) $(PRODUCT_CFI_EXCLUDE_PATHS))
|
|
|
|
$(call add_json_list, CFIIncludePaths, $(CFI_INCLUDE_PATHS) $(PRODUCT_CFI_INCLUDE_PATHS))
|
2017-10-13 06:26:29 +08:00
|
|
|
$(call add_json_list, IntegerOverflowExcludePaths, $(INTEGER_OVERFLOW_EXCLUDE_PATHS) $(PRODUCT_INTEGER_OVERFLOW_EXCLUDE_PATHS))
|
|
|
|
|
2021-01-06 08:36:56 +08:00
|
|
|
$(call add_json_list, MemtagHeapExcludePaths, $(MEMTAG_HEAP_EXCLUDE_PATHS) $(PRODUCT_MEMTAG_HEAP_EXCLUDE_PATHS))
|
|
|
|
$(call add_json_list, MemtagHeapAsyncIncludePaths, $(MEMTAG_HEAP_ASYNC_INCLUDE_PATHS) $(PRODUCT_MEMTAG_HEAP_ASYNC_INCLUDE_PATHS))
|
|
|
|
$(call add_json_list, MemtagHeapSyncIncludePaths, $(MEMTAG_HEAP_SYNC_INCLUDE_PATHS) $(PRODUCT_MEMTAG_HEAP_SYNC_INCLUDE_PATHS))
|
|
|
|
|
2019-02-02 01:06:42 +08:00
|
|
|
$(call add_json_bool, DisableScudo, $(filter true,$(PRODUCT_DISABLE_SCUDO)))
|
|
|
|
|
2017-10-13 06:26:29 +08:00
|
|
|
$(call add_json_bool, ClangTidy, $(filter 1 true,$(WITH_TIDY)))
|
|
|
|
$(call add_json_str, TidyChecks, $(WITH_TIDY_CHECKS))
|
|
|
|
|
2020-06-09 20:04:27 +08:00
|
|
|
$(call add_json_list, JavaCoveragePaths, $(JAVA_COVERAGE_PATHS))
|
|
|
|
$(call add_json_list, JavaCoverageExcludePaths, $(JAVA_COVERAGE_EXCLUDE_PATHS))
|
|
|
|
|
2020-06-17 08:49:08 +08:00
|
|
|
$(call add_json_bool, GcovCoverage, $(filter true,$(NATIVE_COVERAGE)))
|
2019-12-07 07:21:41 +08:00
|
|
|
$(call add_json_bool, ClangCoverage, $(filter true,$(CLANG_COVERAGE)))
|
2020-07-07 22:19:44 +08:00
|
|
|
$(call add_json_list, NativeCoveragePaths, $(NATIVE_COVERAGE_PATHS))
|
|
|
|
$(call add_json_list, NativeCoverageExcludePaths, $(NATIVE_COVERAGE_EXCLUDE_PATHS))
|
2017-10-13 06:26:29 +08:00
|
|
|
|
2020-03-20 14:27:28 +08:00
|
|
|
$(call add_json_bool, SamplingPGO, $(filter true,$(SAMPLING_PGO)))
|
|
|
|
|
2017-10-13 06:26:29 +08:00
|
|
|
$(call add_json_bool, ArtUseReadBarrier, $(call invert_bool,$(filter false,$(PRODUCT_ART_USE_READ_BARRIER))))
|
|
|
|
$(call add_json_bool, Binder32bit, $(BINDER32BIT))
|
|
|
|
$(call add_json_str, BtConfigIncludeDir, $(BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR))
|
2020-05-01 12:18:58 +08:00
|
|
|
$(call add_json_list, DeviceKernelHeaders, $(TARGET_DEVICE_KERNEL_HEADERS) $(TARGET_BOARD_KERNEL_HEADERS) $(TARGET_PRODUCT_KERNEL_HEADERS))
|
2017-10-13 06:26:29 +08:00
|
|
|
$(call add_json_str, DeviceVndkVersion, $(BOARD_VNDK_VERSION))
|
2017-12-07 16:08:19 +08:00
|
|
|
$(call add_json_str, Platform_vndk_version, $(PLATFORM_VNDK_VERSION))
|
2019-11-18 18:43:41 +08:00
|
|
|
$(call add_json_str, ProductVndkVersion, $(PRODUCT_PRODUCT_VNDK_VERSION))
|
2017-11-17 15:09:17 +08:00
|
|
|
$(call add_json_list, ExtraVndkVersions, $(PRODUCT_EXTRA_VNDK_VERSIONS))
|
2018-01-15 13:48:40 +08:00
|
|
|
$(call add_json_list, DeviceSystemSdkVersions, $(BOARD_SYSTEMSDK_VERSIONS))
|
2020-12-22 00:31:10 +08:00
|
|
|
$(call add_json_str, RecoverySnapshotVersion, $(RECOVERY_SNAPSHOT_VERSION))
|
2018-01-15 13:48:40 +08:00
|
|
|
$(call add_json_list, Platform_systemsdk_versions, $(PLATFORM_SYSTEMSDK_VERSIONS))
|
2017-10-13 06:26:29 +08:00
|
|
|
$(call add_json_bool, Malloc_not_svelte, $(call invert_bool,$(filter true,$(MALLOC_SVELTE))))
|
2020-07-31 05:33:11 +08:00
|
|
|
$(call add_json_bool, Malloc_zero_contents, $(call invert_bool,$(filter false,$(MALLOC_ZERO_CONTENTS))))
|
2020-04-30 05:58:34 +08:00
|
|
|
$(call add_json_bool, Malloc_pattern_fill_contents, $(MALLOC_PATTERN_FILL_CONTENTS))
|
2017-10-13 06:26:29 +08:00
|
|
|
$(call add_json_str, Override_rs_driver, $(OVERRIDE_RS_DRIVER))
|
2018-11-17 13:26:33 +08:00
|
|
|
|
2018-10-06 05:41:04 +08:00
|
|
|
$(call add_json_bool, UncompressPrivAppDex, $(call invert_bool,$(filter true,$(DONT_UNCOMPRESS_PRIV_APPS_DEXS))))
|
|
|
|
$(call add_json_list, ModulesLoadedByPrivilegedModules, $(PRODUCT_LOADED_BY_PRIVILEGED_MODULES))
|
2018-11-17 13:26:33 +08:00
|
|
|
|
2018-12-21 23:53:17 +08:00
|
|
|
$(call add_json_list, BootJars, $(PRODUCT_BOOT_JARS))
|
2020-02-10 23:27:45 +08:00
|
|
|
$(call add_json_list, UpdatableBootJars, $(PRODUCT_UPDATABLE_BOOT_JARS))
|
2018-12-21 23:53:17 +08:00
|
|
|
|
2018-11-13 12:16:26 +08:00
|
|
|
$(call add_json_bool, VndkUseCoreVariant, $(TARGET_VNDK_USE_CORE_VARIANT))
|
2019-05-23 07:59:55 +08:00
|
|
|
$(call add_json_bool, VndkSnapshotBuildArtifacts, $(VNDK_SNAPSHOT_BUILD_ARTIFACTS))
|
2018-11-13 12:16:26 +08:00
|
|
|
|
2021-01-06 22:10:41 +08:00
|
|
|
$(call add_json_bool, DirectedVendorSnapshot, $(DIRECTED_VENDOR_SNAPSHOT))
|
|
|
|
$(call add_json_map, VendorSnapshotModules)
|
|
|
|
$(foreach module,$(VENDOR_SNAPSHOT_MODULES),\
|
|
|
|
$(call add_json_bool,$(module),true))
|
|
|
|
$(call end_json_map)
|
|
|
|
|
2021-02-09 23:41:40 +08:00
|
|
|
$(call add_json_bool, DirectedRecoverySnapshot, $(DIRECTED_RECOVERY_SNAPSHOT))
|
|
|
|
$(call add_json_map, RecoverySnapshotModules)
|
|
|
|
$(foreach module,$(RECOVERY_SNAPSHOT_MODULES),\
|
|
|
|
$(call add_json_bool,$(module),true))
|
|
|
|
$(call end_json_map)
|
|
|
|
|
2021-02-25 02:51:54 +08:00
|
|
|
$(call add_json_list, VendorSnapshotDirsIncluded, $(VENDOR_SNAPSHOT_DIRS_INCLUDED))
|
|
|
|
$(call add_json_list, VendorSnapshotDirsExcluded, $(VENDOR_SNAPSHOT_DIRS_EXCLUDED))
|
|
|
|
$(call add_json_list, RecoverySnapshotDirsIncluded, $(RECOVERY_SNAPSHOT_DIRS_INCLUDED))
|
|
|
|
$(call add_json_list, RecoverySnapshotDirsExcluded, $(RECOVERY_SNAPSHOT_DIRS_EXCLUDED))
|
|
|
|
|
2017-12-14 06:07:13 +08:00
|
|
|
$(call add_json_bool, Treble_linker_namespaces, $(filter true,$(PRODUCT_TREBLE_LINKER_NAMESPACES)))
|
|
|
|
$(call add_json_bool, Enforce_vintf_manifest, $(filter true,$(PRODUCT_ENFORCE_VINTF_MANIFEST)))
|
|
|
|
|
2017-10-13 06:26:29 +08:00
|
|
|
$(call add_json_bool, Uml, $(filter true,$(TARGET_USER_MODE_LINUX)))
|
|
|
|
$(call add_json_str, VendorPath, $(TARGET_COPY_OUT_VENDOR))
|
2017-12-18 09:34:26 +08:00
|
|
|
$(call add_json_str, OdmPath, $(TARGET_COPY_OUT_ODM))
|
2020-05-08 05:58:20 +08:00
|
|
|
$(call add_json_str, VendorDlkmPath, $(TARGET_COPY_OUT_VENDOR_DLKM))
|
2020-07-16 07:52:59 +08:00
|
|
|
$(call add_json_str, OdmDlkmPath, $(TARGET_COPY_OUT_ODM_DLKM))
|
2017-11-27 16:04:47 +08:00
|
|
|
$(call add_json_str, ProductPath, $(TARGET_COPY_OUT_PRODUCT))
|
2019-06-25 14:58:13 +08:00
|
|
|
$(call add_json_str, SystemExtPath, $(TARGET_COPY_OUT_SYSTEM_EXT))
|
2017-11-01 04:55:01 +08:00
|
|
|
$(call add_json_bool, MinimizeJavaDebugInfo, $(filter true,$(PRODUCT_MINIMIZE_JAVA_DEBUG_INFO)))
|
2017-10-13 06:26:29 +08:00
|
|
|
|
|
|
|
$(call add_json_bool, UseGoma, $(filter-out false,$(USE_GOMA)))
|
2019-07-17 20:28:40 +08:00
|
|
|
$(call add_json_bool, UseRBE, $(filter-out false,$(USE_RBE)))
|
2020-01-28 03:21:24 +08:00
|
|
|
$(call add_json_bool, UseRBEJAVAC, $(filter-out false,$(RBE_JAVAC)))
|
|
|
|
$(call add_json_bool, UseRBER8, $(filter-out false,$(RBE_R8)))
|
|
|
|
$(call add_json_bool, UseRBED8, $(filter-out false,$(RBE_D8)))
|
2017-11-27 17:51:55 +08:00
|
|
|
$(call add_json_bool, Arc, $(filter true,$(TARGET_ARC)))
|
2017-10-13 06:26:29 +08:00
|
|
|
|
2017-11-22 07:05:07 +08:00
|
|
|
$(call add_json_list, NamespacesToExport, $(PRODUCT_SOONG_NAMESPACES))
|
|
|
|
|
2018-01-30 15:07:26 +08:00
|
|
|
$(call add_json_list, PgoAdditionalProfileDirs, $(PGO_ADDITIONAL_PROFILE_DIRS))
|
|
|
|
|
2020-12-09 22:09:14 +08:00
|
|
|
$(call add_json_list, BoardReqdMaskPolicy, $(BOARD_REQD_MASK_POLICY))
|
2019-05-28 19:58:32 +08:00
|
|
|
$(call add_json_list, BoardVendorSepolicyDirs, $(BOARD_VENDOR_SEPOLICY_DIRS) $(BOARD_SEPOLICY_DIRS))
|
2018-03-26 10:58:03 +08:00
|
|
|
$(call add_json_list, BoardOdmSepolicyDirs, $(BOARD_ODM_SEPOLICY_DIRS))
|
2020-05-08 05:58:20 +08:00
|
|
|
$(call add_json_list, BoardVendorDlkmSepolicyDirs, $(BOARD_VENDOR_DLKM_SEPOLICY_DIRS))
|
2020-07-16 07:52:59 +08:00
|
|
|
$(call add_json_list, BoardOdmDlkmSepolicyDirs, $(BOARD_ODM_DLKM_SEPOLICY_DIRS))
|
2020-07-16 19:00:59 +08:00
|
|
|
# TODO: BOARD_PLAT_* dirs only kept for compatibility reasons. Will be a hard error on API level 31
|
|
|
|
$(call add_json_list, SystemExtPublicSepolicyDirs, $(SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS) $(BOARD_PLAT_PUBLIC_SEPOLICY_DIR))
|
|
|
|
$(call add_json_list, SystemExtPrivateSepolicyDirs, $(SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS) $(BOARD_PLAT_PRIVATE_SEPOLICY_DIR))
|
Build contexts files with Soong
This is to migrate sepolicy Makefiles into Soong. For the first part,
file_contexts, hwservice_contexts, property_contexts, and
service_contexts are migrated. Build-time tests for contexts files are
still in Makefile; they will also be done with Soong after porting the
module sepolicy.
The motivation of migrating is based on generating property_contexts
dynamically: if we were to amend contexts files at build time in the
future, it would be nicer to manage them in Soong. To do that, building
contexts files with Soong can be very helpful.
Bug: 127949646
Bug: 129377144
Test: 1) Build blueline-userdebug, flash, and boot.
Test: 2) Build blueline-userdebug with TARGET_FLATTEN_APEX=true, flash,
and boot.
Test: 3) Build aosp_arm-userdebug.
Change-Id: I486f7065207468697320776f726b732077656c6c
2019-04-15 19:32:14 +08:00
|
|
|
$(call add_json_list, BoardSepolicyM4Defs, $(BOARD_SEPOLICY_M4DEFS))
|
2020-12-09 22:09:14 +08:00
|
|
|
$(call add_json_str, BoardSepolicyVers, $(BOARD_SEPOLICY_VERS))
|
2018-03-26 10:58:03 +08:00
|
|
|
|
2021-03-22 21:16:16 +08:00
|
|
|
$(call add_json_str, PlatformSepolicyVersion, $(PLATFORM_SEPOLICY_VERSION))
|
|
|
|
|
2019-08-13 02:51:33 +08:00
|
|
|
$(call add_json_bool, Flatten_apex, $(filter true,$(TARGET_FLATTEN_APEX)))
|
2021-01-05 19:51:40 +08:00
|
|
|
$(call add_json_bool, ForceApexSymlinkOptimization, $(filter true,$(TARGET_FORCE_APEX_SYMLINK_OPTIMIZATION)))
|
2018-11-08 07:09:54 +08:00
|
|
|
|
2018-11-17 13:26:33 +08:00
|
|
|
$(call add_json_str, DexpreoptGlobalConfig, $(DEX_PREOPT_CONFIG))
|
|
|
|
|
2021-03-23 19:49:56 +08:00
|
|
|
$(call add_json_bool, WithDexpreopt, $(filter true,$(WITH_DEXPREOPT)))
|
|
|
|
|
2019-01-05 11:57:54 +08:00
|
|
|
$(call add_json_list, ManifestPackageNameOverrides, $(PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES))
|
2019-01-29 08:19:33 +08:00
|
|
|
$(call add_json_list, PackageNameOverrides, $(PRODUCT_PACKAGE_NAME_OVERRIDES))
|
|
|
|
$(call add_json_list, CertificateOverrides, $(PRODUCT_CERTIFICATE_OVERRIDES))
|
2019-01-05 11:57:54 +08:00
|
|
|
|
2021-03-24 13:20:33 +08:00
|
|
|
$(call add_json_bool, EnforceSystemCertificate, $(filter true,$(ENFORCE_SYSTEM_CERTIFICATE)))
|
2020-06-12 02:25:05 +08:00
|
|
|
$(call add_json_list, EnforceSystemCertificateAllowList, $(ENFORCE_SYSTEM_CERTIFICATE_ALLOW_LIST))
|
2018-12-17 13:45:15 +08:00
|
|
|
|
2019-02-15 03:22:02 +08:00
|
|
|
$(call add_json_list, ProductHiddenAPIStubs, $(PRODUCT_HIDDENAPI_STUBS))
|
|
|
|
$(call add_json_list, ProductHiddenAPIStubsSystem, $(PRODUCT_HIDDENAPI_STUBS_SYSTEM))
|
|
|
|
$(call add_json_list, ProductHiddenAPIStubsTest, $(PRODUCT_HIDDENAPI_STUBS_TEST))
|
|
|
|
|
Build contexts files with Soong
This is to migrate sepolicy Makefiles into Soong. For the first part,
file_contexts, hwservice_contexts, property_contexts, and
service_contexts are migrated. Build-time tests for contexts files are
still in Makefile; they will also be done with Soong after porting the
module sepolicy.
The motivation of migrating is based on generating property_contexts
dynamically: if we were to amend contexts files at build time in the
future, it would be nicer to manage them in Soong. To do that, building
contexts files with Soong can be very helpful.
Bug: 127949646
Bug: 129377144
Test: 1) Build blueline-userdebug, flash, and boot.
Test: 2) Build blueline-userdebug with TARGET_FLATTEN_APEX=true, flash,
and boot.
Test: 3) Build aosp_arm-userdebug.
Change-Id: I486f7065207468697320776f726b732077656c6c
2019-04-15 19:32:14 +08:00
|
|
|
$(call add_json_list, ProductPublicSepolicyDirs, $(PRODUCT_PUBLIC_SEPOLICY_DIRS))
|
|
|
|
$(call add_json_list, ProductPrivateSepolicyDirs, $(PRODUCT_PRIVATE_SEPOLICY_DIRS))
|
|
|
|
|
2019-04-19 01:10:34 +08:00
|
|
|
$(call add_json_list, TargetFSConfigGen, $(TARGET_FS_CONFIG_GEN))
|
2019-04-11 03:25:07 +08:00
|
|
|
|
2019-05-23 01:25:59 +08:00
|
|
|
$(call add_json_list, MissingUsesLibraries, $(INTERNAL_PLATFORM_MISSING_USES_LIBRARIES))
|
|
|
|
|
2018-11-11 13:48:59 +08:00
|
|
|
$(call add_json_map, VendorVars)
|
2018-03-13 15:04:48 +08:00
|
|
|
$(foreach namespace,$(SOONG_CONFIG_NAMESPACES),\
|
2018-11-11 13:48:59 +08:00
|
|
|
$(call add_json_map, $(namespace))\
|
2018-03-13 15:04:48 +08:00
|
|
|
$(foreach key,$(SOONG_CONFIG_$(namespace)),\
|
2018-11-11 13:48:59 +08:00
|
|
|
$(call add_json_str,$(key),$(SOONG_CONFIG_$(namespace)_$(key))))\
|
|
|
|
$(call end_json_map))
|
|
|
|
$(call end_json_map)
|
2018-03-13 15:04:48 +08:00
|
|
|
|
2021-03-24 13:20:33 +08:00
|
|
|
$(call add_json_bool, EnforceProductPartitionInterface, $(filter true,$(PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE)))
|
2020-08-20 19:21:36 +08:00
|
|
|
$(call add_json_str, DeviceCurrentApiLevelForVendorModules, $(BOARD_CURRENT_API_LEVEL_FOR_VENDOR_MODULES))
|
2019-07-19 12:40:18 +08:00
|
|
|
|
2021-03-24 13:20:33 +08:00
|
|
|
$(call add_json_bool, EnforceInterPartitionJavaSdkLibrary, $(filter true,$(PRODUCT_ENFORCE_INTER_PARTITION_JAVA_SDK_LIBRARY)))
|
2020-10-19 16:29:05 +08:00
|
|
|
$(call add_json_list, InterPartitionJavaLibraryAllowList, $(PRODUCT_INTER_PARTITION_JAVA_LIBRARY_ALLOWLIST))
|
|
|
|
|
2019-12-05 15:14:18 +08:00
|
|
|
$(call add_json_bool, InstallExtraFlattenedApexes, $(PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES))
|
|
|
|
|
2020-11-26 00:00:38 +08:00
|
|
|
$(call add_json_bool, CompressedApex, $(PRODUCT_COMPRESSED_APEX))
|
|
|
|
|
2021-03-24 13:20:33 +08:00
|
|
|
$(call add_json_bool, BoardUsesRecoveryAsBoot, $(filter true,$(BOARD_USES_RECOVERY_AS_BOOT)))
|
2020-01-22 08:12:48 +08:00
|
|
|
|
2020-07-30 05:15:18 +08:00
|
|
|
$(call add_json_list, BoardKernelBinaries, $(BOARD_KERNEL_BINARIES))
|
2020-08-06 05:33:58 +08:00
|
|
|
$(call add_json_list, BoardKernelModuleInterfaceVersions, $(BOARD_KERNEL_MODULE_INTERFACE_VERSIONS))
|
2020-07-30 05:15:18 +08:00
|
|
|
|
2021-03-24 13:20:33 +08:00
|
|
|
$(call add_json_bool, BoardMoveRecoveryResourcesToVendorBoot, $(filter true,$(BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT)))
|
2021-01-09 01:37:47 +08:00
|
|
|
$(call add_json_str, PrebuiltHiddenApiDir, $(BOARD_PREBUILT_HIDDENAPI_DIR))
|
2020-10-22 06:43:56 +08:00
|
|
|
|
2020-12-21 21:52:22 +08:00
|
|
|
$(call add_json_str, ShippingApiLevel, $(PRODUCT_SHIPPING_API_LEVEL))
|
|
|
|
|
2021-03-24 13:20:33 +08:00
|
|
|
$(call add_json_bool, BuildBrokenEnforceSyspropOwner, $(filter true,$(BUILD_BROKEN_ENFORCE_SYSPROP_OWNER)))
|
|
|
|
$(call add_json_bool, BuildBrokenTrebleSyspropNeverallow, $(filter true,$(BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW)))
|
|
|
|
$(call add_json_bool, BuildBrokenVendorPropertyNamespace, $(filter true,$(BUILD_BROKEN_VENDOR_PROPERTY_NAMESPACE)))
|
2021-02-03 17:17:49 +08:00
|
|
|
|
2021-03-24 13:20:33 +08:00
|
|
|
$(call add_json_bool, RequiresInsecureExecmemForSwiftshader, $(filter true,$(PRODUCT_REQUIRES_INSECURE_EXECMEM_FOR_SWIFTSHADER)))
|
2021-03-17 17:04:56 +08:00
|
|
|
|
2021-03-24 13:20:33 +08:00
|
|
|
$(call add_json_bool, SelinuxIgnoreNeverallows, $(filter true,$(SELINUX_IGNORE_NEVERALLOWS)))
|
2021-03-17 17:04:56 +08:00
|
|
|
|
2021-03-23 19:47:39 +08:00
|
|
|
$(call add_json_bool, SepolicySplit, $(filter true,$(PRODUCT_SEPOLICY_SPLIT)))
|
2021-03-17 17:04:56 +08:00
|
|
|
|
2018-11-11 13:48:59 +08:00
|
|
|
$(call json_end)
|
2017-10-13 06:26:29 +08:00
|
|
|
|
2018-11-11 13:48:59 +08:00
|
|
|
$(file >$(SOONG_VARIABLES).tmp,$(json_contents))
|
2017-10-13 06:26:29 +08:00
|
|
|
|
|
|
|
$(shell if ! cmp -s $(SOONG_VARIABLES).tmp $(SOONG_VARIABLES); then \
|
|
|
|
mv $(SOONG_VARIABLES).tmp $(SOONG_VARIABLES); \
|
2016-11-10 09:22:15 +08:00
|
|
|
else \
|
2017-10-13 06:26:29 +08:00
|
|
|
rm $(SOONG_VARIABLES).tmp; \
|
|
|
|
fi)
|
|
|
|
|
|
|
|
endif # CONFIGURE_SOONG
|