Merge "Add prebuilt ELF binaries checker"
diff --git a/core/config.mk b/core/config.mk
index cc8b40b..486193d 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -1227,9 +1227,8 @@
INTERNAL_PLATFORM_SYSTEM_PRIVATE_DEX_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/system-private-dex.txt
endif
-INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/hiddenapi-public-list.txt
-INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/hiddenapi-private-list.txt
INTERNAL_PLATFORM_HIDDENAPI_FLAGS := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/hiddenapi-flags.csv
+INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/hiddenapi-stub-flags.txt
INTERNAL_PLATFORM_HIDDENAPI_GREYLIST_METADATA := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/hiddenapi-greylist.csv
# Missing optional uses-libraries so that the platform doesn't create build rules that depend on
diff --git a/core/definitions.mk b/core/definitions.mk
index 3e7da0d..2cf2bf1 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -2679,8 +2679,8 @@
echo "--output-dex=$(dir $(2))/`basename $$$${INPUT_DEX}`"; \
done | xargs $(HIDDENAPI) encode --api-flags=$(INTERNAL_PLATFORM_HIDDENAPI_FLAGS)
-$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): $(1)
-$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): PRIVATE_DEX_INPUTS := $$(PRIVATE_DEX_INPUTS) $(1)
+$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): $(1)
+$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): PRIVATE_DEX_INPUTS := $$(PRIVATE_DEX_INPUTS) $(1)
endef
else # UNSAFE_DISABLE_HIDDENAPI_FLAGS
define hiddenapi-copy-dex-files
@@ -2696,12 +2696,12 @@
define hiddenapi-generate-csv
ifneq (,$(wildcard frameworks/base))
# Only generate this target if we're in a tree with frameworks/base present.
-$(2): $(1) $(CLASS2GREYLIST) $(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST)
- $(CLASS2GREYLIST) --public-api-list $(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST) $(1) \
+$(2): $(1) $(CLASS2GREYLIST) $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS)
+ $(CLASS2GREYLIST) --stub-api-flags $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS) $(1) \
--write-flags-csv $(2)
-$(3): $(1) $(CLASS2GREYLIST) $(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST)
- $(CLASS2GREYLIST) --public-api-list $(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST) $(1) \
+$(3): $(1) $(CLASS2GREYLIST) $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS)
+ $(CLASS2GREYLIST) --stub-api-flags $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS) $(1) \
--write-metadata-csv $(3)
$(INTERNAL_PLATFORM_HIDDENAPI_FLAGS): $(2)
diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk
index 102fb75..7e38ae8 100644
--- a/core/dex_preopt.mk
+++ b/core/dex_preopt.mk
@@ -47,6 +47,10 @@
HIDDENAPI_STUBS_TEST := \
$(call hiddenapi_stubs_jar,android_test_stubs_current)
+# Core Platform API stubs
+HIDDENAPI_STUBS_CORE_PLATFORM := \
+ $(call hiddenapi_stubs_jar,core.platform.api.stubs)
+
# Allow products to define their own stubs for custom product jars that apps can use.
ifdef PRODUCT_HIDDENAPI_STUBS
HIDDENAPI_STUBS += $(foreach stub,$(PRODUCT_HIDDENAPI_STUBS), $(call hiddenapi_stubs_jar,$(stub)))
@@ -62,29 +66,23 @@
# Singleton rule which applies $(HIDDENAPI) on all boot class path dex files.
# Additional inputs are filled with `hiddenapi-copy-dex-files` rules.
-$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): $(SOONG_HIDDENAPI_DEX_INPUTS)
-$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): PRIVATE_DEX_INPUTS := $(SOONG_HIDDENAPI_DEX_INPUTS)
-
-.KATI_RESTAT: \
- $(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST) \
- $(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST)
-$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): PRIVATE_HIDDENAPI_STUBS := $(HIDDENAPI_STUBS)
-$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): PRIVATE_HIDDENAPI_STUBS_SYSTEM := $(HIDDENAPI_STUBS_SYSTEM)
-$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): PRIVATE_HIDDENAPI_STUBS_TEST := $(HIDDENAPI_STUBS_TEST)
-$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): \
- .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST)
-$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): $(HIDDENAPI) $(HIDDENAPI_STUBS) \
- $(HIDDENAPI_STUBS_SYSTEM) $(HIDDENAPI_STUBS_TEST)
- for INPUT_DEX in $(PRIVATE_DEX_INPUTS); do \
- find `dirname $${INPUT_DEX}` -maxdepth 1 -name "classes*.dex"; \
- done | sort | sed 's/^/--boot-dex=/' | xargs $(HIDDENAPI) list \
- --stub-classpath=$(call normalize-path-list, $(PRIVATE_HIDDENAPI_STUBS)) \
- --stub-classpath=$(call normalize-path-list, $(PRIVATE_HIDDENAPI_STUBS_SYSTEM)) \
- --stub-classpath=$(call normalize-path-list, $(PRIVATE_HIDDENAPI_STUBS_TEST)) \
- --out-public=$(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST).tmp \
- --out-private=$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST).tmp
- $(call commit-change-for-toc,$(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST))
- $(call commit-change-for-toc,$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST))
+.KATI_RESTAT: $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS)
+$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): $(SOONG_HIDDENAPI_DEX_INPUTS)
+$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): PRIVATE_DEX_INPUTS := $(SOONG_HIDDENAPI_DEX_INPUTS)
+$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): PRIVATE_HIDDENAPI_STUBS := $(HIDDENAPI_STUBS)
+$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): PRIVATE_HIDDENAPI_STUBS_SYSTEM := $(HIDDENAPI_STUBS_SYSTEM)
+$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): PRIVATE_HIDDENAPI_STUBS_TEST := $(HIDDENAPI_STUBS_TEST)
+$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): PRIVATE_HIDDENAPI_STUBS_CORE_PLATFORM := $(HIDDENAPI_STUBS_CORE_PLATFORM)
+$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): $(HIDDENAPI) $(HIDDENAPI_STUBS) \
+ $(HIDDENAPI_STUBS_SYSTEM) $(HIDDENAPI_STUBS_TEST) \
+ $(HIDDENAPI_STUBS_CORE_PLATFORM)
+ $(HIDDENAPI) list $(addprefix --boot-dex=,$(PRIVATE_DEX_INPUTS)) \
+ --public-stub-classpath=$(call normalize-path-list, $(PRIVATE_HIDDENAPI_STUBS)) \
+ --public-stub-classpath=$(call normalize-path-list, $(PRIVATE_HIDDENAPI_STUBS_SYSTEM)) \
+ --public-stub-classpath=$(call normalize-path-list, $(PRIVATE_HIDDENAPI_STUBS_TEST)) \
+ --core-platform-stub-classpath=$(call normalize-path-list, $(PRIVATE_HIDDENAPI_STUBS_CORE_PLATFORM)) \
+ --out-api-flags=$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS).tmp
+ $(call commit-change-for-toc,$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS))
# Inputs to singleton rules located in frameworks/base
# Additional inputs are filled with `hiddenapi-generate-csv`
diff --git a/core/soong_config.mk b/core/soong_config.mk
index f8088b7..cd8cd7f 100644
--- a/core/soong_config.mk
+++ b/core/soong_config.mk
@@ -154,7 +154,7 @@
$(call add_json_bool, EnforceSystemCertificate, $(ENFORCE_SYSTEM_CERTIFICATE))
$(call add_json_list, EnforceSystemCertificateWhitelist, $(ENFORCE_SYSTEM_CERTIFICATE_WHITELIST))
-$(call add_json_str, HiddenAPIPublicList, $(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST))
+$(call add_json_str, HiddenAPIStubFlags, $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS))
$(call add_json_str, HiddenAPIFlags, $(INTERNAL_PLATFORM_HIDDENAPI_FLAGS))
$(call add_json_list, HiddenAPIExtraAppUsageJars, $(HIDDENAPI_EXTRA_APP_USAGE_JARS))
diff --git a/core/soong_java_prebuilt.mk b/core/soong_java_prebuilt.mk
index ad1bfce..66410e1 100644
--- a/core/soong_java_prebuilt.mk
+++ b/core/soong_java_prebuilt.mk
@@ -95,7 +95,10 @@
$(eval $(call copy-one-file,$(LOCAL_SOONG_DEX_JAR),$(common_javalib.jar)))
$(eval $(call add-dependency,$(LOCAL_BUILT_MODULE),$(common_javalib.jar)))
- $(eval $(call add-dependency,$(common_javalib.jar),$(full_classes_jar) $(full_classes_header_jar)))
+ $(eval $(call add-dependency,$(common_javalib.jar),$(full_classes_jar)))
+ ifneq ($(TURBINE_ENABLED),false)
+ $(eval $(call add-dependency,$(common_javalib.jar),$(full_classes_header_jar)))
+ endif
endif
java-dex : $(LOCAL_BUILT_MODULE)
diff --git a/target/product/gsi/current.txt b/target/product/gsi/current.txt
index 9eff6b6..e70ab5b 100644
--- a/target/product/gsi/current.txt
+++ b/target/product/gsi/current.txt
@@ -43,6 +43,7 @@
VNDK-SP: libhwbinder_noltopgo.so
VNDK-SP: libion.so
VNDK-SP: liblzma.so
+VNDK-SP: libprocessgroup.so
VNDK-SP: libunwindstack.so
VNDK-SP: libutils.so
VNDK-SP: libutilscallstack.so