blob: 84bfd1e3d23675194b508385243f9e4f2462b264 [file] [log] [blame]
Dan Willemsen04f53ed2016-11-09 17:22:15 -08001SOONG := $(SOONG_OUT_DIR)/soong
2SOONG_BOOTSTRAP := $(SOONG_OUT_DIR)/.soong.bootstrap
3SOONG_BUILD_NINJA := $(SOONG_OUT_DIR)/build.ninja
4SOONG_IN_MAKE := $(SOONG_OUT_DIR)/.soong.in_make
5SOONG_MAKEVARS_MK := $(SOONG_OUT_DIR)/make_vars-$(TARGET_PRODUCT).mk
6SOONG_VARIABLES := $(SOONG_OUT_DIR)/soong.variables
7SOONG_ANDROID_MK := $(SOONG_OUT_DIR)/Android-$(TARGET_PRODUCT).mk
8
9BINDER32BIT :=
10ifneq ($(TARGET_USES_64_BIT_BINDER),true)
11ifneq ($(TARGET_IS_64_BIT),true)
12BINDER32BIT := true
13endif
14endif
15
Colin Cross6db5b0e2018-11-16 21:26:33 -080016include $(BUILD_SYSTEM)/dex_preopt_config.mk
Dan Willemsen7ad03052017-10-12 15:26:29 -070017
Colin Cross6db5b0e2018-11-16 21:26:33 -080018ifeq ($(WRITE_SOONG_VARIABLES),true)
Colin Crossb8901d72018-12-14 11:49:49 -080019
Dan Willemsen04f53ed2016-11-09 17:22:15 -080020# Create soong.variables with copies of makefile settings. Runs every build,
21# but only updates soong.variables if it changes
Dan Willemsen7ad03052017-10-12 15:26:29 -070022$(shell mkdir -p $(dir $(SOONG_VARIABLES)))
Colin Crossee8b1022018-11-10 21:48:59 -080023$(call json_start)
Dan Willemsen7ad03052017-10-12 15:26:29 -070024
25$(call add_json_str, Make_suffix, -$(TARGET_PRODUCT))
26
Nan Zhangcf9d5032018-01-10 11:40:14 -080027$(call add_json_str, BuildId, $(BUILD_ID))
Colin Crossd68a8842020-02-21 17:29:37 -080028$(call add_json_str, BuildNumberFile, build_number.txt)
Nan Zhangcf9d5032018-01-10 11:40:14 -080029
Colin Cross34aba6c2018-05-09 11:10:15 -070030$(call add_json_str, Platform_version_name, $(PLATFORM_VERSION))
Dan Willemsen7ad03052017-10-12 15:26:29 -070031$(call add_json_val, Platform_sdk_version, $(PLATFORM_SDK_VERSION))
Colin Crossf6d3fff2018-04-18 12:40:16 -070032$(call add_json_str, Platform_sdk_codename, $(PLATFORM_VERSION_CODENAME))
33$(call add_json_bool, Platform_sdk_final, $(filter REL,$(PLATFORM_VERSION_CODENAME)))
Dan Willemsen7ad03052017-10-12 15:26:29 -070034$(call add_json_csv, Platform_version_active_codenames, $(PLATFORM_VERSION_ALL_CODENAMES))
Colin Crosse257b262019-04-02 22:57:43 -070035$(call add_json_str, Platform_security_patch, $(PLATFORM_SECURITY_PATCH))
36$(call add_json_str, Platform_preview_sdk_version, $(PLATFORM_PREVIEW_SDK_VERSION))
37$(call add_json_str, Platform_base_os, $(PLATFORM_BASE_OS))
38
39$(call add_json_str, Platform_min_supported_target_sdk_version, $(PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION))
Dan Willemsen7ad03052017-10-12 15:26:29 -070040
41$(call add_json_bool, Allow_missing_dependencies, $(ALLOW_MISSING_DEPENDENCIES))
Martin Stjernholm7a430fd2020-06-04 15:16:39 +010042$(call add_json_bool, Unbundled_build, $(TARGET_BUILD_UNBUNDLED))
Martin Stjernholm74920e62020-06-17 01:30:16 +010043$(call add_json_bool, Unbundled_build_apps, $(TARGET_BUILD_APPS))
Colin Cross8e0ff1c2018-12-18 22:43:16 -080044$(call add_json_bool, Unbundled_build_sdks_from_source, $(UNBUNDLED_BUILD_SDKS_FROM_SOURCE))
Dan Willemsen7ad03052017-10-12 15:26:29 -070045$(call add_json_bool, Pdk, $(filter true,$(TARGET_BUILD_PDK)))
46
47$(call add_json_bool, Debuggable, $(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
48$(call add_json_bool, Eng, $(filter eng,$(TARGET_BUILD_VARIANT)))
49
50$(call add_json_str, DeviceName, $(TARGET_DEVICE))
51$(call add_json_str, DeviceArch, $(TARGET_ARCH))
52$(call add_json_str, DeviceArchVariant, $(TARGET_ARCH_VARIANT))
53$(call add_json_str, DeviceCpuVariant, $(TARGET_CPU_VARIANT))
54$(call add_json_list, DeviceAbi, $(TARGET_CPU_ABI) $(TARGET_CPU_ABI2))
55
56$(call add_json_str, DeviceSecondaryArch, $(TARGET_2ND_ARCH))
57$(call add_json_str, DeviceSecondaryArchVariant, $(TARGET_2ND_ARCH_VARIANT))
58$(call add_json_str, DeviceSecondaryCpuVariant, $(TARGET_2ND_CPU_VARIANT))
59$(call add_json_list, DeviceSecondaryAbi, $(TARGET_2ND_CPU_ABI) $(TARGET_2ND_CPU_ABI2))
60
dimitry3e630522019-04-02 10:50:11 +020061$(call add_json_str, NativeBridgeArch, $(TARGET_NATIVE_BRIDGE_ARCH))
62$(call add_json_str, NativeBridgeArchVariant, $(TARGET_NATIVE_BRIDGE_ARCH_VARIANT))
63$(call add_json_str, NativeBridgeCpuVariant, $(TARGET_NATIVE_BRIDGE_CPU_VARIANT))
64$(call add_json_list, NativeBridgeAbi, $(TARGET_NATIVE_BRIDGE_ABI))
dimitryfb2449f2019-07-10 11:08:58 +020065$(call add_json_str, NativeBridgeRelativePath, $(TARGET_NATIVE_BRIDGE_RELATIVE_PATH))
dimitry3e630522019-04-02 10:50:11 +020066
67$(call add_json_str, NativeBridgeSecondaryArch, $(TARGET_NATIVE_BRIDGE_2ND_ARCH))
68$(call add_json_str, NativeBridgeSecondaryArchVariant, $(TARGET_NATIVE_BRIDGE_2ND_ARCH_VARIANT))
69$(call add_json_str, NativeBridgeSecondaryCpuVariant, $(TARGET_NATIVE_BRIDGE_2ND_CPU_VARIANT))
70$(call add_json_list, NativeBridgeSecondaryAbi, $(TARGET_NATIVE_BRIDGE_2ND_ABI))
dimitryfb2449f2019-07-10 11:08:58 +020071$(call add_json_str, NativeBridgeSecondaryRelativePath, $(TARGET_NATIVE_BRIDGE_2ND_RELATIVE_PATH))
dimitry3e630522019-04-02 10:50:11 +020072
Dan Willemsen7ad03052017-10-12 15:26:29 -070073$(call add_json_str, HostArch, $(HOST_ARCH))
74$(call add_json_str, HostSecondaryArch, $(HOST_2ND_ARCH))
75$(call add_json_bool, HostStaticBinaries, $(BUILD_HOST_static))
76
77$(call add_json_str, CrossHost, $(HOST_CROSS_OS))
78$(call add_json_str, CrossHostArch, $(HOST_CROSS_ARCH))
79$(call add_json_str, CrossHostSecondaryArch, $(HOST_CROSS_2ND_ARCH))
80
Anton Hanssondc017122019-03-18 17:59:27 +000081$(call add_json_list, DeviceResourceOverlays, $(DEVICE_PACKAGE_OVERLAYS))
82$(call add_json_list, ProductResourceOverlays, $(PRODUCT_PACKAGE_OVERLAYS))
Colin Crossc7bd5402017-10-30 17:31:44 -070083$(call add_json_list, EnforceRROTargets, $(PRODUCT_ENFORCE_RRO_TARGETS))
Jeongik Chad99e77d2020-03-09 12:31:23 +090084$(call add_json_list, EnforceRROExemptedTargets, $(PRODUCT_ENFORCE_RRO_EXEMPTED_TARGETS))
Colin Crossc7bd5402017-10-30 17:31:44 -070085$(call add_json_list, EnforceRROExcludedOverlays, $(PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS))
86
87$(call add_json_str, AAPTCharacteristics, $(TARGET_AAPT_CHARACTERISTICS))
88$(call add_json_list, AAPTConfig, $(PRODUCT_AAPT_CONFIG))
89$(call add_json_str, AAPTPreferredConfig, $(PRODUCT_AAPT_PREF_CONFIG))
90$(call add_json_list, AAPTPrebuiltDPI, $(PRODUCT_AAPT_PREBUILT_DPI))
91
Colin Cross0e10ff52017-12-01 17:13:56 -080092$(call add_json_str, DefaultAppCertificate, $(PRODUCT_DEFAULT_DEV_CERTIFICATE))
93
Colin Crossc7bd5402017-10-30 17:31:44 -070094$(call add_json_str, AppsDefaultVersionName, $(APPS_DEFAULT_VERSION_NAME))
95
Dan Willemsen7ad03052017-10-12 15:26:29 -070096$(call add_json_list, SanitizeHost, $(SANITIZE_HOST))
97$(call add_json_list, SanitizeDevice, $(SANITIZE_TARGET))
98$(call add_json_list, SanitizeDeviceDiag, $(SANITIZE_TARGET_DIAG))
99$(call add_json_list, SanitizeDeviceArch, $(SANITIZE_TARGET_ARCH))
100
101$(call add_json_bool, Safestack, $(filter true,$(USE_SAFESTACK)))
102$(call add_json_bool, EnableCFI, $(call invert_bool,$(filter false,$(ENABLE_CFI))))
Vishwath Mohan23b2d2e2017-10-31 02:25:16 -0700103$(call add_json_list, CFIExcludePaths, $(CFI_EXCLUDE_PATHS) $(PRODUCT_CFI_EXCLUDE_PATHS))
104$(call add_json_list, CFIIncludePaths, $(CFI_INCLUDE_PATHS) $(PRODUCT_CFI_INCLUDE_PATHS))
Dan Willemsen7ad03052017-10-12 15:26:29 -0700105$(call add_json_list, IntegerOverflowExcludePaths, $(INTEGER_OVERFLOW_EXCLUDE_PATHS) $(PRODUCT_INTEGER_OVERFLOW_EXCLUDE_PATHS))
106
Peter Collingbourne784db1a2019-10-29 11:00:20 -0700107$(call add_json_bool, Experimental_mte, $(filter true,$(TARGET_EXPERIMENTAL_MTE)))
108
Kostya Kortchinsky02732402019-02-01 09:06:42 -0800109$(call add_json_bool, DisableScudo, $(filter true,$(PRODUCT_DISABLE_SCUDO)))
110
Dan Willemsen7ad03052017-10-12 15:26:29 -0700111$(call add_json_bool, ClangTidy, $(filter 1 true,$(WITH_TIDY)))
112$(call add_json_str, TidyChecks, $(WITH_TIDY_CHECKS))
113
Roland Levillain17541b92020-06-09 13:04:27 +0100114$(call add_json_list, JavaCoveragePaths, $(JAVA_COVERAGE_PATHS))
115$(call add_json_list, JavaCoverageExcludePaths, $(JAVA_COVERAGE_EXCLUDE_PATHS))
116
Kyriakos Ispoglouc3627b52020-01-24 13:08:08 -0800117$(call add_json_bool, NativeLineCoverage, $(filter true,$(NATIVE_LINE_COVERAGE)))
Colin Cross74daa972020-01-21 11:37:20 -0800118$(call add_json_bool, Native_coverage, $(filter true,$(NATIVE_COVERAGE)))
Oliver Nguyenf0fdf802019-12-06 15:21:41 -0800119$(call add_json_bool, ClangCoverage, $(filter true,$(CLANG_COVERAGE)))
Roland Levillainbad8b382020-06-09 12:39:36 +0100120# TODO(b/158212027): Remove `$(COVERAGE_PATHS)` from this list when all users have been moved to
121# `NATIVE_COVERAGE_PATHS`.
122$(call add_json_list, NativeCoveragePaths, $(COVERAGE_PATHS) $(NATIVE_COVERAGE_PATHS))
123# TODO(b/158212027): Remove `$(COVERAGE_EXCLUDE_PATHS)` from this list when all users have been
124# moved to `NATIVE_COVERAGE_EXCLUDE_PATHS`.
125$(call add_json_list, NativeCoverageExcludePaths, $(COVERAGE_EXCLUDE_PATHS) $(NATIVE_COVERAGE_EXCLUDE_PATHS))
Dan Willemsen7ad03052017-10-12 15:26:29 -0700126
Yi Kongbcbcd652020-03-20 14:27:28 +0800127$(call add_json_bool, SamplingPGO, $(filter true,$(SAMPLING_PGO)))
128
Dan Willemsen7ad03052017-10-12 15:26:29 -0700129$(call add_json_bool, ArtUseReadBarrier, $(call invert_bool,$(filter false,$(PRODUCT_ART_USE_READ_BARRIER))))
130$(call add_json_bool, Binder32bit, $(BINDER32BIT))
Dan Willemsen7ad03052017-10-12 15:26:29 -0700131$(call add_json_str, BtConfigIncludeDir, $(BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR))
Dan Willemsene6bd1d22020-04-30 21:18:58 -0700132$(call add_json_list, DeviceKernelHeaders, $(TARGET_DEVICE_KERNEL_HEADERS) $(TARGET_BOARD_KERNEL_HEADERS) $(TARGET_PRODUCT_KERNEL_HEADERS))
Dan Willemsen7ad03052017-10-12 15:26:29 -0700133$(call add_json_str, DeviceVndkVersion, $(BOARD_VNDK_VERSION))
Justin Yun2a233b32017-12-07 17:08:19 +0900134$(call add_json_str, Platform_vndk_version, $(PLATFORM_VNDK_VERSION))
Justin Yunf19d8402019-11-18 19:43:41 +0900135$(call add_json_str, ProductVndkVersion, $(PRODUCT_PRODUCT_VNDK_VERSION))
Justin Yun9272ef82017-11-17 16:09:17 +0900136$(call add_json_list, ExtraVndkVersions, $(PRODUCT_EXTRA_VNDK_VERSIONS))
Inseob Kim10e02dc2019-05-07 21:00:45 +0900137$(call add_json_bool, BoardVndkRuntimeDisable, $(BOARD_VNDK_RUNTIME_DISABLE))
Jiyong Park641b6cc2018-01-15 14:48:40 +0900138$(call add_json_list, DeviceSystemSdkVersions, $(BOARD_SYSTEMSDK_VERSIONS))
139$(call add_json_list, Platform_systemsdk_versions, $(PLATFORM_SYSTEMSDK_VERSIONS))
Dan Willemsen7ad03052017-10-12 15:26:29 -0700140$(call add_json_bool, Malloc_not_svelte, $(call invert_bool,$(filter true,$(MALLOC_SVELTE))))
Evgenii Stepanov701cbae2020-04-29 14:58:34 -0700141$(call add_json_bool, Malloc_zero_contents, $(MALLOC_ZERO_CONTENTS))
142$(call add_json_bool, Malloc_pattern_fill_contents, $(MALLOC_PATTERN_FILL_CONTENTS))
Dan Willemsen7ad03052017-10-12 15:26:29 -0700143$(call add_json_str, Override_rs_driver, $(OVERRIDE_RS_DRIVER))
Colin Cross6db5b0e2018-11-16 21:26:33 -0800144
Colin Cross3aa2f8f2018-10-05 14:41:04 -0700145$(call add_json_bool, UncompressPrivAppDex, $(call invert_bool,$(filter true,$(DONT_UNCOMPRESS_PRIV_APPS_DEXS))))
146$(call add_json_list, ModulesLoadedByPrivilegedModules, $(PRODUCT_LOADED_BY_PRIVILEGED_MODULES))
Colin Cross6db5b0e2018-11-16 21:26:33 -0800147
Vladimir Markoe3a2db82018-12-21 15:53:17 +0000148$(call add_json_list, BootJars, $(PRODUCT_BOOT_JARS))
Ulya Trafimovich36101542020-02-10 15:27:45 +0000149$(call add_json_list, UpdatableBootJars, $(PRODUCT_UPDATABLE_BOOT_JARS))
Vladimir Markoe3a2db82018-12-21 15:53:17 +0000150
Vic Yang51512c52018-11-12 20:16:26 -0800151$(call add_json_bool, VndkUseCoreVariant, $(TARGET_VNDK_USE_CORE_VARIANT))
Inseob Kim316f77b2019-05-23 08:59:55 +0900152$(call add_json_bool, VndkSnapshotBuildArtifacts, $(VNDK_SNAPSHOT_BUILD_ARTIFACTS))
Vic Yang51512c52018-11-12 20:16:26 -0800153
Steven Moreland0cf92b02017-12-13 14:07:13 -0800154$(call add_json_bool, Treble_linker_namespaces, $(filter true,$(PRODUCT_TREBLE_LINKER_NAMESPACES)))
Steven Moreland0cf92b02017-12-13 14:07:13 -0800155$(call add_json_bool, Enforce_vintf_manifest, $(filter true,$(PRODUCT_ENFORCE_VINTF_MANIFEST)))
156
Logan Chien0e53d882018-11-06 17:32:40 +0800157$(call add_json_bool, Check_elf_files, $(filter true,$(PRODUCT_CHECK_ELF_FILES)))
158
Dan Willemsen7ad03052017-10-12 15:26:29 -0700159$(call add_json_bool, Uml, $(filter true,$(TARGET_USER_MODE_LINUX)))
Rajeev Kumar2052eb52018-03-09 17:49:49 -0800160$(call add_json_bool, Use_lmkd_stats_log, $(filter true,$(TARGET_LMKD_STATS_LOG)))
Dan Willemsen7ad03052017-10-12 15:26:29 -0700161$(call add_json_str, VendorPath, $(TARGET_COPY_OUT_VENDOR))
Jiyong Park9848be32017-12-18 10:34:26 +0900162$(call add_json_str, OdmPath, $(TARGET_COPY_OUT_ODM))
Jaekyun Seokb7735d82017-11-27 17:04:47 +0900163$(call add_json_str, ProductPath, $(TARGET_COPY_OUT_PRODUCT))
Justin Yun6151e3f2019-06-25 15:58:13 +0900164$(call add_json_str, SystemExtPath, $(TARGET_COPY_OUT_SYSTEM_EXT))
Colin Cross829a16e2017-10-31 13:55:01 -0700165$(call add_json_bool, MinimizeJavaDebugInfo, $(filter true,$(PRODUCT_MINIMIZE_JAVA_DEBUG_INFO)))
Dan Willemsen7ad03052017-10-12 15:26:29 -0700166
167$(call add_json_bool, UseGoma, $(filter-out false,$(USE_GOMA)))
Ramy Medhatec8b8df2019-07-17 12:28:40 +0000168$(call add_json_bool, UseRBE, $(filter-out false,$(USE_RBE)))
Ramy Medhata9cc25d2020-01-27 14:21:24 -0500169$(call add_json_bool, UseRBEJAVAC, $(filter-out false,$(RBE_JAVAC)))
170$(call add_json_bool, UseRBER8, $(filter-out false,$(RBE_R8)))
171$(call add_json_bool, UseRBED8, $(filter-out false,$(RBE_D8)))
Risanf6c45ce2017-11-27 18:51:55 +0900172$(call add_json_bool, Arc, $(filter true,$(TARGET_ARC)))
Dan Willemsen7ad03052017-10-12 15:26:29 -0700173
Jeff Gaston1fe28d32017-11-21 15:05:07 -0800174$(call add_json_list, NamespacesToExport, $(PRODUCT_SOONG_NAMESPACES))
175
Pirama Arumuga Nainar676fbe72018-01-29 23:07:26 -0800176$(call add_json_list, PgoAdditionalProfileDirs, $(PGO_ADDITIONAL_PROFILE_DIRS))
177
Felixc3cdac62019-05-28 13:58:32 +0200178$(call add_json_list, BoardVendorSepolicyDirs, $(BOARD_VENDOR_SEPOLICY_DIRS) $(BOARD_SEPOLICY_DIRS))
Tri Vo82d1c882018-03-25 19:58:03 -0700179$(call add_json_list, BoardOdmSepolicyDirs, $(BOARD_ODM_SEPOLICY_DIRS))
Tri Vo49483082018-05-20 14:33:11 -0700180$(call add_json_list, BoardPlatPublicSepolicyDirs, $(BOARD_PLAT_PUBLIC_SEPOLICY_DIR))
181$(call add_json_list, BoardPlatPrivateSepolicyDirs, $(BOARD_PLAT_PRIVATE_SEPOLICY_DIR))
Inseob Kimcd0e4772019-04-15 20:32:14 +0900182$(call add_json_list, BoardSepolicyM4Defs, $(BOARD_SEPOLICY_M4DEFS))
Tri Vo82d1c882018-03-25 19:58:03 -0700183
Roland Levillain7672ab82019-08-12 19:51:33 +0100184$(call add_json_bool, Flatten_apex, $(filter true,$(TARGET_FLATTEN_APEX)))
Jiyong Park5217eed2018-11-08 08:09:54 +0900185
Colin Cross6db5b0e2018-11-16 21:26:33 -0800186$(call add_json_str, DexpreoptGlobalConfig, $(DEX_PREOPT_CONFIG))
187
Jiyong Park185d41e2019-01-05 12:57:54 +0900188$(call add_json_list, ManifestPackageNameOverrides, $(PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES))
Jaewoong Jung7dfae502019-01-28 16:19:33 -0800189$(call add_json_list, PackageNameOverrides, $(PRODUCT_PACKAGE_NAME_OVERRIDES))
190$(call add_json_list, CertificateOverrides, $(PRODUCT_CERTIFICATE_OVERRIDES))
Jiyong Park185d41e2019-01-05 12:57:54 +0900191
Jeongik Chab2c4bb72018-12-17 14:45:15 +0900192$(call add_json_bool, EnforceSystemCertificate, $(ENFORCE_SYSTEM_CERTIFICATE))
Colin Crossc3ad8042020-06-11 11:25:05 -0700193$(call add_json_list, EnforceSystemCertificateAllowList, $(ENFORCE_SYSTEM_CERTIFICATE_ALLOW_LIST))
Jeongik Chab2c4bb72018-12-17 14:45:15 +0900194
Colin Cross36f79c42019-02-14 11:22:02 -0800195$(call add_json_list, ProductHiddenAPIStubs, $(PRODUCT_HIDDENAPI_STUBS))
196$(call add_json_list, ProductHiddenAPIStubsSystem, $(PRODUCT_HIDDENAPI_STUBS_SYSTEM))
197$(call add_json_list, ProductHiddenAPIStubsTest, $(PRODUCT_HIDDENAPI_STUBS_TEST))
198
Inseob Kimcd0e4772019-04-15 20:32:14 +0900199$(call add_json_list, ProductPublicSepolicyDirs, $(PRODUCT_PUBLIC_SEPOLICY_DIRS))
200$(call add_json_list, ProductPrivateSepolicyDirs, $(PRODUCT_PRIVATE_SEPOLICY_DIRS))
201$(call add_json_bool, ProductCompatibleProperty, $(PRODUCT_COMPATIBLE_PROPERTY))
202
Dan Willemsen7f25f2a2019-04-18 10:10:34 -0700203$(call add_json_list, TargetFSConfigGen, $(TARGET_FS_CONFIG_GEN))
Dan Willemsend32e6d12019-04-10 12:25:07 -0700204
Colin Cross56199af2019-05-22 10:25:59 -0700205$(call add_json_list, MissingUsesLibraries, $(INTERNAL_PLATFORM_MISSING_USES_LIBRARIES))
206
Colin Crossee8b1022018-11-10 21:48:59 -0800207$(call add_json_map, VendorVars)
Dan Willemseneaacf5b2018-03-13 00:04:48 -0700208$(foreach namespace,$(SOONG_CONFIG_NAMESPACES),\
Colin Crossee8b1022018-11-10 21:48:59 -0800209 $(call add_json_map, $(namespace))\
Dan Willemseneaacf5b2018-03-13 00:04:48 -0700210 $(foreach key,$(SOONG_CONFIG_$(namespace)),\
Colin Crossee8b1022018-11-10 21:48:59 -0800211 $(call add_json_str,$(key),$(SOONG_CONFIG_$(namespace)_$(key))))\
212 $(call end_json_map))
213$(call end_json_map)
Dan Willemseneaacf5b2018-03-13 00:04:48 -0700214
Jeongik Cha74529792019-07-19 13:40:18 +0900215$(call add_json_bool, EnforceProductPartitionInterface, $(PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE))
216
Jooyung Han9efe5342019-12-05 16:14:18 +0900217$(call add_json_bool, InstallExtraFlattenedApexes, $(PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES))
218
Yifan Hong9a190e22020-01-21 16:12:48 -0800219$(call add_json_bool, BoardUsesRecoveryAsBoot, $(BOARD_USES_RECOVERY_AS_BOOT))
220
Colin Crossee8b1022018-11-10 21:48:59 -0800221$(call json_end)
Dan Willemsen7ad03052017-10-12 15:26:29 -0700222
Colin Crossee8b1022018-11-10 21:48:59 -0800223$(file >$(SOONG_VARIABLES).tmp,$(json_contents))
Dan Willemsen7ad03052017-10-12 15:26:29 -0700224
225$(shell if ! cmp -s $(SOONG_VARIABLES).tmp $(SOONG_VARIABLES); then \
226 mv $(SOONG_VARIABLES).tmp $(SOONG_VARIABLES); \
Dan Willemsen04f53ed2016-11-09 17:22:15 -0800227 else \
Dan Willemsen7ad03052017-10-12 15:26:29 -0700228 rm $(SOONG_VARIABLES).tmp; \
229 fi)
230
Dan Willemsen7ad03052017-10-12 15:26:29 -0700231endif # CONFIGURE_SOONG