Merge "Use APK CtsShim prebuilts for flattened apex." into rvc-dev-plus-aosp
diff --git a/core/base_rules.mk b/core/base_rules.mk
index f5e8e35..db99e33 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -562,17 +562,35 @@
ifneq ($(strip $(LOCAL_TEST_DATA)),)
ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE))
-my_test_data_pairs := $(strip $(foreach td,$(LOCAL_TEST_DATA), \
- $(eval _file := $(call word-colon,2,$(td))) \
- $(if $(_file), \
- $(eval _src_base := $(call word-colon,1,$(td))), \
- $(eval _src_base := $(LOCAL_PATH)) \
- $(eval _file := $(call word-colon,1,$(td)))) \
- $(if $(call streq,$(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK)),, \
- $(if $(findstring ..,$(_file)),$(error $(LOCAL_MODULE_MAKEFILE): LOCAL_TEST_DATA may not include '..': $(_file))) \
- $(if $(filter /%,$(_src_base) $(_file)),$(error $(LOCAL_MODULE_MAKEFILE): LOCAL_TEST_DATA may not include absolute paths: $(_src_base) $(_file)))) \
- $(eval my_test_data_file_pairs := $(my_test_data_file_pairs) $(call append-path,$(_src_base),$(_file)):$(_file)) \
- $(call append-path,$(_src_base),$(_file)):$(call append-path,$(my_module_path),$(_file))))
+ifeq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK))
+ define copy_test_data_pairs
+ _src_base := $$(call word-colon,1,$$(td))
+ _file := $$(call word-colon,2,$$(td))
+ my_test_data_pairs += $$(call append-path,$$(_src_base),$$(_file)):$$(call append-path,$$(my_module_path),$$(_file))
+ my_test_data_file_pairs += $$(call append-path,$$(_src_base),$$(_file)):$$(_file)
+ endef
+else
+ define copy_test_data_pairs
+ _src_base := $$(call word-colon,1,$$(td))
+ _file := $$(call word-colon,2,$$(td))
+ ifndef _file
+ _file := $$(_src_base)
+ _src_base := $$(LOCAL_PATH)
+ endif
+ ifneq (,$$(findstring ..,$$(_file)))
+ $$(call pretty-error,LOCAL_TEST_DATA may not include '..': $$(_file))
+ endif
+ ifneq (,$$(filter/%,$$(_src_base) $$(_file)))
+ $$(call pretty-error,LOCAL_TEST_DATA may not include absolute paths: $$(_src_base) $$(_file))
+ endif
+ my_test_data_pairs += $$(call append-path,$$(_src_base),$$(_file)):$$(call append-path,$$(my_module_path),$$(_file))
+ my_test_data_file_pairs += $$(call append-path,$$(_src_base),$$(_file)):$$(_file)
+ endef
+endif
+
+$(foreach td,$(LOCAL_TEST_DATA),$(eval $(copy_test_data_pairs)))
+
+copy_test_data_pairs :=
my_installed_test_data := $(call copy-many-files,$(my_test_data_pairs))
$(LOCAL_INSTALLED_MODULE): $(my_installed_test_data)
diff --git a/core/binary.mk b/core/binary.mk
index b14d8b8..4894bf2 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -1799,7 +1799,7 @@
$(call intermediates-dir-for,HEADER_LIBRARIES,$(l),$(my_kind),,$(LOCAL_2ND_ARCH_VAR_PREFIX),$(my_host_cross))))
ifneq ($(strip $(my_export_c_include_dirs)$(export_include_deps)),)
- EXPORTS_LIST := $(EXPORTS_LIST) $(intermediates)
+ EXPORTS_LIST += $(intermediates)
EXPORTS.$(intermediates).FLAGS := $(foreach d,$(my_export_c_include_dirs),-I $(call clean-path,$(d)))
EXPORTS.$(intermediates).REEXPORT := $(export_include_deps)
EXPORTS.$(intermediates).DEPS := $(my_export_c_include_deps) $(my_generated_sources) $(LOCAL_EXPORT_C_INCLUDE_DEPS)
diff --git a/core/cc_prebuilt_internal.mk b/core/cc_prebuilt_internal.mk
index 1d959b5..99b7d0f 100644
--- a/core/cc_prebuilt_internal.mk
+++ b/core/cc_prebuilt_internal.mk
@@ -75,7 +75,7 @@
built_module := $(LOCAL_BUILT_MODULE)
ifdef prebuilt_module_is_a_library
-EXPORTS_LIST := $(EXPORTS_LIST) $(intermediates)
+EXPORTS_LIST += $(intermediates)
EXPORTS.$(intermediates).FLAGS := $(foreach d,$(LOCAL_EXPORT_C_INCLUDE_DIRS),-I $(d))
EXPORTS.$(intermediates).DEPS := $(LOCAL_EXPORT_C_INCLUDE_DEPS)
diff --git a/core/definitions.mk b/core/definitions.mk
index ec174cf..4b843b1 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -110,6 +110,15 @@
# All compatibility suites mentioned in LOCAL_COMPATIBILITY_SUITES
ALL_COMPATIBILITY_SUITES :=
+# All LINK_TYPE entries
+ALL_LINK_TYPES :=
+
+# All exported/imported include entries
+EXPORTS_LIST :=
+
+# All modules already converted to Soong
+SOONG_ALREADY_CONV :=
+
###########################################################
## Debugging; prints a variable list to stdout
###########################################################
diff --git a/core/link_type.mk b/core/link_type.mk
index ff525cb..48cd8f3 100644
--- a/core/link_type.mk
+++ b/core/link_type.mk
@@ -12,7 +12,7 @@
my_link_prefix := LINK_TYPE:$(call find-idf-prefix,$(my_kind),$(my_host_cross)):$(if $(my_common),$(my_common):_,_:$(if $(my_2nd_arch_prefix),$(my_2nd_arch_prefix),_))
link_type := $(my_link_prefix):$(LOCAL_MODULE_CLASS):$(LOCAL_MODULE)
-ALL_LINK_TYPES := $(ALL_LINK_TYPES) $(link_type)
+ALL_LINK_TYPES += $(link_type)
$(link_type).TYPE := $(my_link_type)
$(link_type).MAKEFILE := $(LOCAL_MODULE_MAKEFILE)
$(link_type).WARN := $(my_warn_types)
diff --git a/core/soong_android_app_set.mk b/core/soong_android_app_set.mk
index 4c27e53..5ed9b2c 100644
--- a/core/soong_android_app_set.mk
+++ b/core/soong_android_app_set.mk
@@ -31,4 +31,4 @@
$(LOCAL_INSTALLED_MODULE): PRIVATE_POST_INSTALL_CMD := $(LOCAL_POST_INSTALL_CMD)
PACKAGES.$(LOCAL_MODULE).OVERRIDES := $(strip $(LOCAL_OVERRIDES_PACKAGES))
-SOONG_ALREADY_CONV := $(SOONG_ALREADY_CONV) $(LOCAL_MODULE)
+SOONG_ALREADY_CONV += $(LOCAL_MODULE)
diff --git a/core/soong_app_prebuilt.mk b/core/soong_app_prebuilt.mk
index 09c79f6..3549c1d 100644
--- a/core/soong_app_prebuilt.mk
+++ b/core/soong_app_prebuilt.mk
@@ -218,4 +218,4 @@
$(LOCAL_INSTALLED_MODULE): $(my_coverage_files)
endif
-SOONG_ALREADY_CONV := $(SOONG_ALREADY_CONV) $(LOCAL_MODULE)
+SOONG_ALREADY_CONV += $(LOCAL_MODULE)
diff --git a/core/soong_cc_prebuilt.mk b/core/soong_cc_prebuilt.mk
index 6317b53..986609b 100644
--- a/core/soong_cc_prebuilt.mk
+++ b/core/soong_cc_prebuilt.mk
@@ -51,7 +51,7 @@
ifneq ($(filter STATIC_LIBRARIES SHARED_LIBRARIES HEADER_LIBRARIES,$(LOCAL_MODULE_CLASS)),)
# Soong module is a static or shared library
- EXPORTS_LIST := $(EXPORTS_LIST) $(intermediates)
+ EXPORTS_LIST += $(intermediates)
EXPORTS.$(intermediates).FLAGS := $(LOCAL_EXPORT_CFLAGS)
EXPORTS.$(intermediates).DEPS := $(LOCAL_EXPORT_C_INCLUDE_DEPS)
@@ -61,7 +61,7 @@
$(my_all_targets): $(LOCAL_BUILT_MODULE).toc
endif
- SOONG_ALREADY_CONV := $(SOONG_ALREADY_CONV) $(LOCAL_MODULE)
+ SOONG_ALREADY_CONV += $(LOCAL_MODULE)
my_link_type := $(LOCAL_SOONG_LINK_TYPE)
my_warn_types :=
diff --git a/core/soong_java_prebuilt.mk b/core/soong_java_prebuilt.mk
index b15e7f6..e4c84e0 100644
--- a/core/soong_java_prebuilt.mk
+++ b/core/soong_java_prebuilt.mk
@@ -173,4 +173,4 @@
$(hide) echo $(PRIVATE_EXPORTED_SDK_LIBS) | tr ' ' '\n' > $@,\
$(hide) touch $@)
-SOONG_ALREADY_CONV := $(SOONG_ALREADY_CONV) $(LOCAL_MODULE)
+SOONG_ALREADY_CONV += $(LOCAL_MODULE)