aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Cross2019-01-15 19:38:41 -0600
committerColin Cross2019-01-15 19:38:41 -0600
commit5d196364e1b3e56ed831c909df69d2b344aef8a4 (patch)
tree6f043bdcd8925a7f945c80f4008d749572c9bc35
parenta76cc6d732431ebb2ceddaf87445aedd548d1623 (diff)
downloadplatform-build-5d196364e1b3e56ed831c909df69d2b344aef8a4.tar.gz
platform-build-5d196364e1b3e56ed831c909df69d2b344aef8a4.tar.xz
platform-build-5d196364e1b3e56ed831c909df69d2b344aef8a4.zip
Revert "Simplify soong_java_prebuilt.mk and soong_app_prebuilt.mk"
This reverts commit a76cc6d732431ebb2ceddaf87445aedd548d1623. Reason for revert: broke emma turbine build Change-Id: Ie894565501d0de44f96dc736408a8c4e2ba2ed90
-rw-r--r--core/soong_app_prebuilt.mk29
-rw-r--r--core/soong_java_prebuilt.mk91
2 files changed, 61 insertions, 59 deletions
diff --git a/core/soong_app_prebuilt.mk b/core/soong_app_prebuilt.mk
index c50df07f4..f7236335b 100644
--- a/core/soong_app_prebuilt.mk
+++ b/core/soong_app_prebuilt.mk
@@ -27,22 +27,8 @@ full_classes_jar := $(intermediates.COMMON)/classes.jar
27full_classes_pre_proguard_jar := $(intermediates.COMMON)/classes-pre-proguard.jar 27full_classes_pre_proguard_jar := $(intermediates.COMMON)/classes-pre-proguard.jar
28full_classes_header_jar := $(intermediates.COMMON)/classes-header.jar 28full_classes_header_jar := $(intermediates.COMMON)/classes-header.jar
29 29
30ifdef LOCAL_SOONG_CLASSES_JAR 30$(eval $(call copy-one-file,$(LOCAL_SOONG_CLASSES_JAR),$(full_classes_jar)))
31 $(eval $(call copy-one-file,$(LOCAL_SOONG_CLASSES_JAR),$(full_classes_jar))) 31$(eval $(call copy-one-file,$(LOCAL_SOONG_CLASSES_JAR),$(full_classes_pre_proguard_jar)))
32 $(eval $(call copy-one-file,$(LOCAL_SOONG_CLASSES_JAR),$(full_classes_pre_proguard_jar)))
33 $(eval $(call add-dependency,$(LOCAL_BUILT_MODULE),$(full_classes_jar)))
34
35 ifneq ($(TURBINE_ENABLED),false)
36 ifdef LOCAL_SOONG_HEADER_JAR
37 $(eval $(call copy-one-file,$(LOCAL_SOONG_HEADER_JAR),$(full_classes_header_jar)))
38 $(eval $(call add-dependency,$(full_classes_jar),$(full_classes_header_jar)))
39 else
40 $(eval $(call copy-one-file,$(full_classes_jar),$(full_classes_header_jar)))
41 endif
42 endif # TURBINE_ENABLED != false
43endif
44
45$(eval $(call copy-one-file,$(LOCAL_PREBUILT_MODULE_FILE),$(LOCAL_BUILT_MODULE)))
46 32
47ifdef LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR 33ifdef LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR
48 $(eval $(call copy-one-file,$(LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR),\ 34 $(eval $(call copy-one-file,$(LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR),\
@@ -58,6 +44,15 @@ ifdef LOCAL_SOONG_PROGUARD_DICT
58 $(intermediates.COMMON)/proguard_dictionary) 44 $(intermediates.COMMON)/proguard_dictionary)
59endif 45endif
60 46
47ifneq ($(TURBINE_ENABLED),false)
48ifdef LOCAL_SOONG_HEADER_JAR
49$(eval $(call copy-one-file,$(LOCAL_SOONG_HEADER_JAR),$(full_classes_header_jar)))
50else
51$(eval $(call copy-one-file,$(full_classes_jar),$(full_classes_header_jar)))
52endif
53endif # TURBINE_ENABLED != false
54
55
61ifdef LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE 56ifdef LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE
62resource_export_package := $(intermediates.COMMON)/package-export.apk 57resource_export_package := $(intermediates.COMMON)/package-export.apk
63resource_export_stamp := $(intermediates.COMMON)/src/R.stamp 58resource_export_stamp := $(intermediates.COMMON)/src/R.stamp
@@ -79,6 +74,8 @@ ifneq ($(BUILD_PLATFORM_ZIP),)
79 $(eval $(call copy-one-file,$(LOCAL_SOONG_DEX_JAR),$(dir $(LOCAL_BUILT_MODULE))package.dex.apk)) 74 $(eval $(call copy-one-file,$(LOCAL_SOONG_DEX_JAR),$(dir $(LOCAL_BUILT_MODULE))package.dex.apk))
80endif 75endif
81 76
77$(eval $(call copy-one-file,$(LOCAL_PREBUILT_MODULE_FILE),$(LOCAL_BUILT_MODULE)))
78
82my_built_installed := $(foreach f,$(LOCAL_SOONG_BUILT_INSTALLED),\ 79my_built_installed := $(foreach f,$(LOCAL_SOONG_BUILT_INSTALLED),\
83 $(call word-colon,1,$(f)):$(PRODUCT_OUT)$(call word-colon,2,$(f))) 80 $(call word-colon,1,$(f)):$(PRODUCT_OUT)$(call word-colon,2,$(f)))
84my_installed := $(call copy-many-files, $(my_built_installed)) 81my_installed := $(call copy-many-files, $(my_built_installed))
diff --git a/core/soong_java_prebuilt.mk b/core/soong_java_prebuilt.mk
index 81a65d098..cfda44e0e 100644
--- a/core/soong_java_prebuilt.mk
+++ b/core/soong_java_prebuilt.mk
@@ -24,22 +24,8 @@ common_javalib.jar := $(intermediates.COMMON)/javalib.jar
24hiddenapi_flags_csv := $(intermediates.COMMON)/hiddenapi/flags.csv 24hiddenapi_flags_csv := $(intermediates.COMMON)/hiddenapi/flags.csv
25hiddenapi_metadata_csv := $(intermediates.COMMON)/hiddenapi/greylist.csv 25hiddenapi_metadata_csv := $(intermediates.COMMON)/hiddenapi/greylist.csv
26 26
27ifdef LOCAL_SOONG_CLASSES_JAR 27$(eval $(call copy-one-file,$(LOCAL_SOONG_CLASSES_JAR),$(full_classes_jar)))
28 $(eval $(call copy-one-file,$(LOCAL_SOONG_CLASSES_JAR),$(full_classes_jar))) 28$(eval $(call copy-one-file,$(LOCAL_SOONG_CLASSES_JAR),$(full_classes_pre_proguard_jar)))
29 $(eval $(call copy-one-file,$(LOCAL_SOONG_CLASSES_JAR),$(full_classes_pre_proguard_jar)))
30 $(eval $(call add-dependency,$(LOCAL_BUILT_MODULE),$(full_classes_jar)))
31
32 ifneq ($(TURBINE_ENABLED),false)
33 ifdef LOCAL_SOONG_HEADER_JAR
34 $(eval $(call copy-one-file,$(LOCAL_SOONG_HEADER_JAR),$(full_classes_header_jar)))
35 $(eval $(call add-dependency,$(full_classes_jar),$(full_classes_header_jar)))
36 else
37 $(eval $(call copy-one-file,$(full_classes_jar),$(full_classes_header_jar)))
38 endif
39 endif # TURBINE_ENABLED != false
40endif
41
42$(eval $(call copy-one-file,$(LOCAL_PREBUILT_MODULE_FILE),$(LOCAL_BUILT_MODULE)))
43 29
44ifdef LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR 30ifdef LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR
45 $(eval $(call copy-one-file,$(LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR),\ 31 $(eval $(call copy-one-file,$(LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR),\
@@ -78,33 +64,49 @@ ifdef LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE
78 $(call add-dependency,$(LOCAL_BUILT_MODULE),$(my_static_library_android_manifest)) 64 $(call add-dependency,$(LOCAL_BUILT_MODULE),$(my_static_library_android_manifest))
79endif # LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE 65endif # LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE
80 66
67ifneq ($(TURBINE_ENABLED),false)
68ifdef LOCAL_SOONG_HEADER_JAR
69$(eval $(call copy-one-file,$(LOCAL_SOONG_HEADER_JAR),$(full_classes_header_jar)))
70else
71$(eval $(call copy-one-file,$(full_classes_jar),$(full_classes_header_jar)))
72endif
73endif # TURBINE_ENABLED != false
81 74
82ifdef LOCAL_SOONG_DEX_JAR 75ifdef LOCAL_SOONG_DEX_JAR
83 ifndef LOCAL_IS_HOST_MODULE 76 ifneq ($(LOCAL_UNINSTALLABLE_MODULE),true)
84 ifneq ($(filter $(LOCAL_MODULE),$(PRODUCT_BOOT_JARS)),) # is_boot_jar 77 ifndef LOCAL_IS_HOST_MODULE
85 # Derive greylist from classes.jar. 78 ifneq ($(filter $(LOCAL_MODULE),$(PRODUCT_BOOT_JARS)),) # is_boot_jar
86 # We use full_classes_jar here, which is the post-proguard jar (on the basis that we also 79 # Derive greylist from classes.jar.
87 # have a full_classes_pre_proguard_jar). This is consistent with the equivalent code in 80 # We use full_classes_jar here, which is the post-proguard jar (on the basis that we also
88 # java.mk. 81 # have a full_classes_pre_proguard_jar). This is consistent with the equivalent code in
89 $(eval $(call hiddenapi-generate-csv,$(full_classes_jar),$(hiddenapi_flags_csv),$(hiddenapi_metadata_csv))) 82 # java.mk.
90 $(eval $(call hiddenapi-copy-soong-jar,$(LOCAL_SOONG_DEX_JAR),$(common_javalib.jar))) 83 $(eval $(call hiddenapi-generate-csv,$(full_classes_jar),$(hiddenapi_flags_csv),$(hiddenapi_metadata_csv)))
91 84 $(eval $(call hiddenapi-copy-soong-jar,$(LOCAL_SOONG_DEX_JAR),$(common_javalib.jar)))
92 ifeq (true,$(WITH_DEXPREOPT)) 85
93 # For libart, the boot jars' odex files are replaced by $(DEFAULT_DEX_PREOPT_INSTALLED_IMAGE). 86 ifeq (true,$(WITH_DEXPREOPT))
94 # We use this installed_odex trick to get boot.art installed. 87 # For libart, the boot jars' odex files are replaced by $(DEFAULT_DEX_PREOPT_INSTALLED_IMAGE).
95 installed_odex := $(DEFAULT_DEX_PREOPT_INSTALLED_IMAGE) 88 # We use this installed_odex trick to get boot.art installed.
96 # Append the odex for the 2nd arch if we have one. 89 installed_odex := $(DEFAULT_DEX_PREOPT_INSTALLED_IMAGE)
97 installed_odex += $($(TARGET_2ND_ARCH_VAR_PREFIX)DEFAULT_DEX_PREOPT_INSTALLED_IMAGE) 90 # Append the odex for the 2nd arch if we have one.
98 ALL_MODULES.$(my_register_name).INSTALLED += $(installed_odex) 91 installed_odex += $($(TARGET_2ND_ARCH_VAR_PREFIX)DEFAULT_DEX_PREOPT_INSTALLED_IMAGE)
99 # Make sure to install the .odex and .vdex when you run "make <module_name>" 92 ALL_MODULES.$(my_register_name).INSTALLED += $(installed_odex)
100 $(my_all_targets): $(installed_odex) 93 # Make sure to install the .odex and .vdex when you run "make <module_name>"
101 endif 94 $(my_all_targets): $(installed_odex)
102 else # !is_boot_jar 95 endif
103 $(eval $(call copy-one-file,$(LOCAL_SOONG_DEX_JAR),$(common_javalib.jar))) 96 else # !is_boot_jar
104 endif # is_boot_jar 97 $(eval $(call copy-one-file,$(LOCAL_SOONG_DEX_JAR),$(common_javalib.jar)))
105 98 endif # is_boot_jar
106 $(eval $(call add-dependency,$(LOCAL_BUILT_MODULE),$(common_javalib.jar))) 99 $(eval $(call add-dependency,$(common_javalib.jar),$(full_classes_jar) $(full_classes_header_jar)))
107 $(eval $(call add-dependency,$(common_javalib.jar),$(full_classes_jar) $(full_classes_header_jar))) 100
101 $(eval $(call copy-one-file,$(LOCAL_PREBUILT_MODULE_FILE),$(LOCAL_BUILT_MODULE)))
102 $(eval $(call add-dependency,$(LOCAL_BUILT_MODULE),$(common_javalib.jar)))
103 else # LOCAL_IS_HOST_MODULE
104 $(eval $(call copy-one-file,$(LOCAL_SOONG_DEX_JAR),$(LOCAL_BUILT_MODULE)))
105 $(eval $(call add-dependency,$(LOCAL_BUILT_MODULE),$(full_classes_jar) $(full_classes_header_jar)))
106 endif
107
108 java-dex : $(LOCAL_BUILT_MODULE)
109 else # LOCAL_UNINSTALLABLE_MODULE
108 110
109 ifneq ($(filter $(LOCAL_MODULE),$(HIDDENAPI_EXTRA_APP_USAGE_JARS)),) 111 ifneq ($(filter $(LOCAL_MODULE),$(HIDDENAPI_EXTRA_APP_USAGE_JARS)),)
110 # Derive greylist from classes.jar. 112 # Derive greylist from classes.jar.
@@ -113,15 +115,18 @@ ifdef LOCAL_SOONG_DEX_JAR
113 # java.mk. 115 # java.mk.
114 $(eval $(call hiddenapi-generate-csv,$(full_classes_jar),$(hiddenapi_flags_csv),$(hiddenapi_metadata_csv))) 116 $(eval $(call hiddenapi-generate-csv,$(full_classes_jar),$(hiddenapi_flags_csv),$(hiddenapi_metadata_csv)))
115 endif 117 endif
116 endif
117 118
118 java-dex : $(LOCAL_BUILT_MODULE) 119 $(eval $(call copy-one-file,$(full_classes_jar),$(LOCAL_BUILT_MODULE)))
120 $(eval $(call copy-one-file,$(LOCAL_SOONG_DEX_JAR),$(common_javalib.jar)))
121 java-dex : $(common_javalib.jar)
122 endif # LOCAL_UNINSTALLABLE_MODULE
119else # LOCAL_SOONG_DEX_JAR 123else # LOCAL_SOONG_DEX_JAR
120 ifndef LOCAL_UNINSTALLABLE_MODULE 124 ifndef LOCAL_UNINSTALLABLE_MODULE
121 ifndef LOCAL_IS_HOST_MODULE 125 ifndef LOCAL_IS_HOST_MODULE
122 $(call pretty-error,Installable device module must have LOCAL_SOONG_DEX_JAR set) 126 $(call pretty-error,Installable device module must have LOCAL_SOONG_DEX_JAR set)
123 endif 127 endif
124 endif 128 endif
129 $(eval $(call copy-one-file,$(full_classes_jar),$(LOCAL_BUILT_MODULE)))
125endif # LOCAL_SOONG_DEX_JAR 130endif # LOCAL_SOONG_DEX_JAR
126 131
127my_built_installed := $(foreach f,$(LOCAL_SOONG_BUILT_INSTALLED),\ 132my_built_installed := $(foreach f,$(LOCAL_SOONG_BUILT_INSTALLED),\