Loading core/definitions.mk +1 −9 Original line number Diff line number Diff line Loading @@ -681,7 +681,7 @@ endef # $(1): library name # $(2): Non-empty if IS_HOST_MODULE define _java-lib-full-classes.jar $(call _java-lib-dir,$(1),$(2))/$(if $(2),javalib,classes)$(COMMON_JAVA_PACKAGE_SUFFIX) $(call _java-lib-dir,$(1),$(2))/classes.jar endef # Get the jar files (you can pass to "javac -classpath") of static or shared Loading @@ -704,14 +704,6 @@ define java-lib-deps $(call java-lib-files,$(1),$(2)) endef # Get the jar files (you can pass to "javac -classpath") of host dalvik Java libraries. # You can also use them as dependency files. # A host dalvik Java library is different from a host Java library in that # the java lib file is classes.jar, not javalib.jar. # $(1): library name list define host-dex-java-lib-files $(foreach lib,$(1),$(call _java-lib-dir,$(lib),true)/classes.jar) endef ########################################################### ## Convert "core ext framework" to "out/.../classes.jack ..." Loading core/host_java_library.mk +2 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ emma_intermediates_dir := $(intermediates.COMMON)/emma_out # emma is hardcoded to use the leaf name of its input for the output file -- # only the output directory can be changed full_classes_emma_jar := $(emma_intermediates_dir)/lib/$(notdir $(full_classes_jarjar_jar)) full_classes_jar := $(intermediates.COMMON)/classes.jar LOCAL_INTERMEDIATE_TARGETS += \ $(full_classes_compiled_jar) \ Loading Loading @@ -104,3 +105,4 @@ full_classes_emma_jar := $(full_classes_jarjar_jar) endif # LOCAL_EMMA_INSTRUMENT $(eval $(call copy-one-file,$(full_classes_emma_jar),$(LOCAL_BUILT_MODULE))) $(eval $(call copy-one-file,$(full_classes_emma_jar),$(full_classes_jar))) core/java.mk +1 −1 Original line number Diff line number Diff line Loading @@ -640,7 +640,7 @@ $(built_dex_intermediate): PRIVATE_DX_FLAGS := $(LOCAL_DX_FLAGS) ifeq ($(LOCAL_EMMA_INSTRUMENT),true) $(built_dex_intermediate): PRIVATE_DX_FLAGS += --no-locals endif $(built_dex_intermediate): $(full_classes_proguard_jar) $(DX) $(built_dex_intermediate): $(full_classes_jar) $(DX) $(transform-classes.jar-to-dex) endif # LOCAL_JACK_ENABLED is disabled Loading core/java_common.mk +3 −3 Original line number Diff line number Diff line Loading @@ -151,7 +151,7 @@ ifdef need_compile_java full_static_java_libs := \ $(foreach lib,$(LOCAL_STATIC_JAVA_LIBRARIES), \ $(call intermediates-dir-for, \ JAVA_LIBRARIES,$(lib),$(LOCAL_IS_HOST_MODULE),COMMON)/javalib.jar) JAVA_LIBRARIES,$(lib),$(LOCAL_IS_HOST_MODULE),COMMON)/classes.jar) $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_STATIC_JAVA_LIBRARIES := $(full_static_java_libs) Loading Loading @@ -216,11 +216,11 @@ ifeq ($(USE_CORE_LIB_BOOTCLASSPATH),true) ifeq ($(LOCAL_NO_STANDARD_LIBRARIES),true) my_bootclasspath := "" else my_bootclasspath := $(call normalize-path-list,$(call host-dex-java-lib-files,core-oj-hostdex core-libart-hostdex)) my_bootclasspath := $(call normalize-path-list,$(call java-lib-files,core-oj-hostdex core-libart-hostdex,true)) endif $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(my_bootclasspath) full_shared_java_libs := $(call host-dex-java-lib-files,$(LOCAL_JAVA_LIBRARIES)) full_shared_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES),true) full_java_lib_deps := $(full_shared_java_libs) else # !USE_CORE_LIB_BOOTCLASSPATH $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := Loading core/java_library.mk +15 −16 Original line number Diff line number Diff line Loading @@ -35,9 +35,14 @@ LOCAL_BUILT_MODULE_STEM := classes.jack endif endif # For non-static java libraries, other modules should depend on # out/target/common/obj/JAVA_LIBRARIES/.../javalib.jar (for jack) # or out/target/common/obj/JAVA_LIBRARIES/.../classes.jar (for javac). # For static java libraries, other modules should depend on # out/target/common/obj/JAVA_LIBRARIES/.../classes.jar # There are some dependencies outside the build system that assume static # java libraries produce javalib.jar, so we will copy classes.jar there too. intermediates.COMMON := $(call local-intermediates-dir,COMMON) # This file will be the one that other modules should depend on. common_javalib.jar := $(intermediates.COMMON)/javalib.jar LOCAL_INTERMEDIATE_TARGETS += $(common_javalib.jar) Loading Loading @@ -65,18 +70,15 @@ include $(BUILD_SYSTEM)/java.mk ################################# ifeq ($(LOCAL_IS_STATIC_JAVA_LIBRARY),true) # No dex; all we want are the .class files with resources. $(common_javalib.jar) : $(java_resource_sources) $(common_javalib.jar) : $(full_classes_jar) @echo "target Static Jar: $(PRIVATE_MODULE) ($@)" $(copy-file-to-target) # There are some dependencies outside the build system that assume classes.jar # is available as javalib.jar so copy it there too. $(eval $(call copy-one-file,$(full_classes_jar),$(common_javalib.jar))) ifdef LOCAL_JACK_ENABLED $(LOCAL_BUILT_MODULE) : $(full_classes_jack) $(eval $(call copy-one-file,$(full_classes_jack),$(LOCAL_BUILT_MODULE))) else $(LOCAL_BUILT_MODULE) : $(common_javalib.jar) $(eval $(call copy-one-file,$(full_classes_jar),$(LOCAL_BUILT_MODULE))) endif $(copy-file-to-target) else # !LOCAL_IS_STATIC_JAVA_LIBRARY Loading @@ -100,8 +102,7 @@ ifdef LOCAL_DEX_PREOPT ifneq ($(dexpreopt_boot_jar_module),) # boot jar # boot jar's rules are defined in dex_preopt.mk dexpreopted_boot_jar := $(DEXPREOPT_BOOT_JAR_DIR_FULL_PATH)/$(dexpreopt_boot_jar_module)_nodex.jar $(LOCAL_BUILT_MODULE) : $(dexpreopted_boot_jar) $(call copy-file-to-target) $(eval $(call copy-one-file,$(dexpreopted_boot_jar),$(LOCAL_BUILT_MODULE))) # For libart boot jars, we don't have .odex files. else # ! boot jar Loading @@ -111,8 +112,7 @@ $(built_odex) : $(dir $(LOCAL_BUILT_MODULE))% : $(common_javalib.jar) @echo "Dexpreopt Jar: $(PRIVATE_MODULE) ($@)" $(call dexpreopt-one-file,$<,$@) $(LOCAL_BUILT_MODULE) : $(common_javalib.jar) $(call copy-file-to-target) $(eval $(call copy-one-file,$(common_javalib.jar),$(LOCAL_BUILT_MODULE))) ifneq (nostripping,$(LOCAL_DEX_PREOPT)) $(call dexpreopt-remove-classes.dex,$@) endif Loading @@ -120,8 +120,7 @@ endif endif # ! boot jar else # LOCAL_DEX_PREOPT $(LOCAL_BUILT_MODULE) : $(common_javalib.jar) $(call copy-file-to-target) $(eval $(call copy-one-file,$(common_javalib.jar),$(LOCAL_BUILT_MODULE))) endif # LOCAL_DEX_PREOPT endif # !LOCAL_IS_STATIC_JAVA_LIBRARY Loading
core/definitions.mk +1 −9 Original line number Diff line number Diff line Loading @@ -681,7 +681,7 @@ endef # $(1): library name # $(2): Non-empty if IS_HOST_MODULE define _java-lib-full-classes.jar $(call _java-lib-dir,$(1),$(2))/$(if $(2),javalib,classes)$(COMMON_JAVA_PACKAGE_SUFFIX) $(call _java-lib-dir,$(1),$(2))/classes.jar endef # Get the jar files (you can pass to "javac -classpath") of static or shared Loading @@ -704,14 +704,6 @@ define java-lib-deps $(call java-lib-files,$(1),$(2)) endef # Get the jar files (you can pass to "javac -classpath") of host dalvik Java libraries. # You can also use them as dependency files. # A host dalvik Java library is different from a host Java library in that # the java lib file is classes.jar, not javalib.jar. # $(1): library name list define host-dex-java-lib-files $(foreach lib,$(1),$(call _java-lib-dir,$(lib),true)/classes.jar) endef ########################################################### ## Convert "core ext framework" to "out/.../classes.jack ..." Loading
core/host_java_library.mk +2 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ emma_intermediates_dir := $(intermediates.COMMON)/emma_out # emma is hardcoded to use the leaf name of its input for the output file -- # only the output directory can be changed full_classes_emma_jar := $(emma_intermediates_dir)/lib/$(notdir $(full_classes_jarjar_jar)) full_classes_jar := $(intermediates.COMMON)/classes.jar LOCAL_INTERMEDIATE_TARGETS += \ $(full_classes_compiled_jar) \ Loading Loading @@ -104,3 +105,4 @@ full_classes_emma_jar := $(full_classes_jarjar_jar) endif # LOCAL_EMMA_INSTRUMENT $(eval $(call copy-one-file,$(full_classes_emma_jar),$(LOCAL_BUILT_MODULE))) $(eval $(call copy-one-file,$(full_classes_emma_jar),$(full_classes_jar)))
core/java.mk +1 −1 Original line number Diff line number Diff line Loading @@ -640,7 +640,7 @@ $(built_dex_intermediate): PRIVATE_DX_FLAGS := $(LOCAL_DX_FLAGS) ifeq ($(LOCAL_EMMA_INSTRUMENT),true) $(built_dex_intermediate): PRIVATE_DX_FLAGS += --no-locals endif $(built_dex_intermediate): $(full_classes_proguard_jar) $(DX) $(built_dex_intermediate): $(full_classes_jar) $(DX) $(transform-classes.jar-to-dex) endif # LOCAL_JACK_ENABLED is disabled Loading
core/java_common.mk +3 −3 Original line number Diff line number Diff line Loading @@ -151,7 +151,7 @@ ifdef need_compile_java full_static_java_libs := \ $(foreach lib,$(LOCAL_STATIC_JAVA_LIBRARIES), \ $(call intermediates-dir-for, \ JAVA_LIBRARIES,$(lib),$(LOCAL_IS_HOST_MODULE),COMMON)/javalib.jar) JAVA_LIBRARIES,$(lib),$(LOCAL_IS_HOST_MODULE),COMMON)/classes.jar) $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_STATIC_JAVA_LIBRARIES := $(full_static_java_libs) Loading Loading @@ -216,11 +216,11 @@ ifeq ($(USE_CORE_LIB_BOOTCLASSPATH),true) ifeq ($(LOCAL_NO_STANDARD_LIBRARIES),true) my_bootclasspath := "" else my_bootclasspath := $(call normalize-path-list,$(call host-dex-java-lib-files,core-oj-hostdex core-libart-hostdex)) my_bootclasspath := $(call normalize-path-list,$(call java-lib-files,core-oj-hostdex core-libart-hostdex,true)) endif $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(my_bootclasspath) full_shared_java_libs := $(call host-dex-java-lib-files,$(LOCAL_JAVA_LIBRARIES)) full_shared_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES),true) full_java_lib_deps := $(full_shared_java_libs) else # !USE_CORE_LIB_BOOTCLASSPATH $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := Loading
core/java_library.mk +15 −16 Original line number Diff line number Diff line Loading @@ -35,9 +35,14 @@ LOCAL_BUILT_MODULE_STEM := classes.jack endif endif # For non-static java libraries, other modules should depend on # out/target/common/obj/JAVA_LIBRARIES/.../javalib.jar (for jack) # or out/target/common/obj/JAVA_LIBRARIES/.../classes.jar (for javac). # For static java libraries, other modules should depend on # out/target/common/obj/JAVA_LIBRARIES/.../classes.jar # There are some dependencies outside the build system that assume static # java libraries produce javalib.jar, so we will copy classes.jar there too. intermediates.COMMON := $(call local-intermediates-dir,COMMON) # This file will be the one that other modules should depend on. common_javalib.jar := $(intermediates.COMMON)/javalib.jar LOCAL_INTERMEDIATE_TARGETS += $(common_javalib.jar) Loading Loading @@ -65,18 +70,15 @@ include $(BUILD_SYSTEM)/java.mk ################################# ifeq ($(LOCAL_IS_STATIC_JAVA_LIBRARY),true) # No dex; all we want are the .class files with resources. $(common_javalib.jar) : $(java_resource_sources) $(common_javalib.jar) : $(full_classes_jar) @echo "target Static Jar: $(PRIVATE_MODULE) ($@)" $(copy-file-to-target) # There are some dependencies outside the build system that assume classes.jar # is available as javalib.jar so copy it there too. $(eval $(call copy-one-file,$(full_classes_jar),$(common_javalib.jar))) ifdef LOCAL_JACK_ENABLED $(LOCAL_BUILT_MODULE) : $(full_classes_jack) $(eval $(call copy-one-file,$(full_classes_jack),$(LOCAL_BUILT_MODULE))) else $(LOCAL_BUILT_MODULE) : $(common_javalib.jar) $(eval $(call copy-one-file,$(full_classes_jar),$(LOCAL_BUILT_MODULE))) endif $(copy-file-to-target) else # !LOCAL_IS_STATIC_JAVA_LIBRARY Loading @@ -100,8 +102,7 @@ ifdef LOCAL_DEX_PREOPT ifneq ($(dexpreopt_boot_jar_module),) # boot jar # boot jar's rules are defined in dex_preopt.mk dexpreopted_boot_jar := $(DEXPREOPT_BOOT_JAR_DIR_FULL_PATH)/$(dexpreopt_boot_jar_module)_nodex.jar $(LOCAL_BUILT_MODULE) : $(dexpreopted_boot_jar) $(call copy-file-to-target) $(eval $(call copy-one-file,$(dexpreopted_boot_jar),$(LOCAL_BUILT_MODULE))) # For libart boot jars, we don't have .odex files. else # ! boot jar Loading @@ -111,8 +112,7 @@ $(built_odex) : $(dir $(LOCAL_BUILT_MODULE))% : $(common_javalib.jar) @echo "Dexpreopt Jar: $(PRIVATE_MODULE) ($@)" $(call dexpreopt-one-file,$<,$@) $(LOCAL_BUILT_MODULE) : $(common_javalib.jar) $(call copy-file-to-target) $(eval $(call copy-one-file,$(common_javalib.jar),$(LOCAL_BUILT_MODULE))) ifneq (nostripping,$(LOCAL_DEX_PREOPT)) $(call dexpreopt-remove-classes.dex,$@) endif Loading @@ -120,8 +120,7 @@ endif endif # ! boot jar else # LOCAL_DEX_PREOPT $(LOCAL_BUILT_MODULE) : $(common_javalib.jar) $(call copy-file-to-target) $(eval $(call copy-one-file,$(common_javalib.jar),$(LOCAL_BUILT_MODULE))) endif # LOCAL_DEX_PREOPT endif # !LOCAL_IS_STATIC_JAVA_LIBRARY