2016-11-10 09:22:15 +08:00
|
|
|
SOONG := $(SOONG_OUT_DIR)/soong
|
|
|
|
SOONG_BOOTSTRAP := $(SOONG_OUT_DIR)/.soong.bootstrap
|
|
|
|
SOONG_BUILD_NINJA := $(SOONG_OUT_DIR)/build.ninja
|
|
|
|
SOONG_IN_MAKE := $(SOONG_OUT_DIR)/.soong.in_make
|
|
|
|
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))
|
|
|
|
$(call add_json_str, BuildNumberFromFile, $$$(BUILD_NUMBER_FROM_FILE))
|
|
|
|
|
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))
|
|
|
|
$(call add_json_csv, Platform_version_future_codenames, $(PLATFORM_VERSION_FUTURE_CODENAMES))
|
|
|
|
|
|
|
|
$(call add_json_bool, Allow_missing_dependencies, $(ALLOW_MISSING_DEPENDENCIES))
|
|
|
|
$(call add_json_bool, Unbundled_build, $(TARGET_BUILD_APPS))
|
2018-12-19 14:43:16 +08:00
|
|
|
$(call add_json_bool, Unbundled_build_sdks_from_source, $(UNBUNDLED_BUILD_SDKS_FROM_SOURCE))
|
2017-10-13 06:26:29 +08:00
|
|
|
$(call add_json_bool, Pdk, $(filter true,$(TARGET_BUILD_PDK)))
|
|
|
|
|
|
|
|
$(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))
|
|
|
|
|
|
|
|
$(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))
|
|
|
|
|
2017-10-31 08:31:44 +08:00
|
|
|
$(call add_json_list, ResourceOverlays, $(PRODUCT_PACKAGE_OVERLAYS) $(DEVICE_PACKAGE_OVERLAYS))
|
|
|
|
$(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))
|
2018-11-22 01:04:18 +08:00
|
|
|
$(call add_json_bool, EnableXOM, $(filter true,$(ENABLE_XOM)))
|
|
|
|
$(call add_json_list, XOMExcludePaths, $(XOM_EXCLUDE_PATHS) $(PRODUCT_XOM_EXCLUDE_PATHS))
|
2017-10-13 06:26:29 +08:00
|
|
|
$(call add_json_list, IntegerOverflowExcludePaths, $(INTEGER_OVERFLOW_EXCLUDE_PATHS) $(PRODUCT_INTEGER_OVERFLOW_EXCLUDE_PATHS))
|
|
|
|
|
|
|
|
$(call add_json_bool, ClangTidy, $(filter 1 true,$(WITH_TIDY)))
|
|
|
|
$(call add_json_str, TidyChecks, $(WITH_TIDY_CHECKS))
|
|
|
|
|
|
|
|
$(call add_json_bool, NativeCoverage, $(filter true,$(NATIVE_COVERAGE)))
|
2017-10-21 07:19:42 +08:00
|
|
|
$(call add_json_list, CoveragePaths, $(COVERAGE_PATHS))
|
|
|
|
$(call add_json_list, CoverageExcludePaths, $(COVERAGE_EXCLUDE_PATHS))
|
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))
|
|
|
|
$(call add_json_list, DeviceKernelHeaders, $(TARGET_PROJECT_SYSTEM_INCLUDES))
|
2018-10-02 06:31:16 +08:00
|
|
|
$(call add_json_bool, DevicePrefer32BitApps, $(filter true,$(TARGET_PREFER_32_BIT_APPS)))
|
2017-10-13 06:26:29 +08:00
|
|
|
$(call add_json_bool, DevicePrefer32BitExecutables, $(filter true,$(TARGET_PREFER_32_BIT_EXECUTABLES)))
|
|
|
|
$(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))
|
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))
|
|
|
|
$(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))))
|
|
|
|
$(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
|
|
|
|
|
|
|
$(call add_json_bool, DisableDexPreopt, $(call invert_bool,$(filter true,$(WITH_DEXPREOPT))))
|
2018-10-06 05:41:04 +08:00
|
|
|
$(call add_json_list, DisableDexPreoptModules, $(DEXPREOPT_DISABLED_MODULES))
|
2018-11-17 13:26:33 +08:00
|
|
|
$(call add_json_str, DexPreoptProfileDir, $(PRODUCT_DEX_PREOPT_PROFILE_DIR))
|
2017-12-14 06:07:13 +08:00
|
|
|
|
2018-06-21 09:11:12 +08:00
|
|
|
$(call add_json_bool, Product_is_iot, $(filter true,$(PRODUCT_IOT)))
|
|
|
|
|
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)))
|
2018-03-10 09:49:49 +08:00
|
|
|
$(call add_json_bool, Use_lmkd_stats_log, $(filter true,$(TARGET_LMKD_STATS_LOG)))
|
2017-10-13 06:26:29 +08:00
|
|
|
$(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))
|
2017-11-27 16:04:47 +08:00
|
|
|
$(call add_json_str, ProductPath, $(TARGET_COPY_OUT_PRODUCT))
|
2018-05-29 20:09:01 +08:00
|
|
|
$(call add_json_str, ProductServicesPath, $(TARGET_COPY_OUT_PRODUCT_SERVICES))
|
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)))
|
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))
|
|
|
|
|
2018-03-26 10:58:03 +08:00
|
|
|
$(call add_json_list, BoardVendorSepolicyDirs, $(BOARD_SEPOLICY_DIRS))
|
|
|
|
$(call add_json_list, BoardOdmSepolicyDirs, $(BOARD_ODM_SEPOLICY_DIRS))
|
2018-05-21 05:33:11 +08:00
|
|
|
$(call add_json_list, BoardPlatPublicSepolicyDirs, $(BOARD_PLAT_PUBLIC_SEPOLICY_DIR))
|
|
|
|
$(call add_json_list, BoardPlatPrivateSepolicyDirs, $(BOARD_PLAT_PRIVATE_SEPOLICY_DIR))
|
2018-03-26 10:58:03 +08:00
|
|
|
|
2018-11-08 07:09:54 +08:00
|
|
|
$(call add_json_bool, FlattenApex, $(filter true,$(TARGET_FLATTEN_APEX)))
|
|
|
|
|
2018-11-17 13:26:33 +08:00
|
|
|
$(call add_json_str, DexpreoptGlobalConfig, $(DEX_PREOPT_CONFIG))
|
|
|
|
|
2019-01-05 11:57:54 +08:00
|
|
|
$(call add_json_list, ManifestPackageNameOverrides, $(PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES))
|
|
|
|
|
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
|
|
|
|
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
|