Merge "Add a make maco to convert string to upper case"
diff --git a/core/Makefile b/core/Makefile
index 99d6c21..566a0da 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1093,7 +1093,7 @@
@echo "DumpPublicKey: $@ <= $(PRIVATE_OTA_PUBLIC_KEYS) $(extra_keys)"
@rm -rf $@
@mkdir -p $(dir $@)
- java -jar $(DUMPKEY_JAR) $(PRIVATE_OTA_PUBLIC_KEYS) $(extra_keys) > $@
+ $(JAVA) -jar $(DUMPKEY_JAR) $(PRIVATE_OTA_PUBLIC_KEYS) $(extra_keys) > $@
RECOVERYIMAGE_ID_FILE := $(PRODUCT_OUT)/recovery.id
@@ -1875,7 +1875,7 @@
endif
endif
-INTERNAL_AVB_MAKE_VBMETA_IMAGE_ARGS += --padding_size 4096
+BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --padding_size 4096
# Add kernel cmdline descriptor for kernel to mount system.img as root with
# dm-verity. This works when system.img is either chained or not-chained:
diff --git a/core/binary.mk b/core/binary.mk
index b2b8186..61a8ef6 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -24,9 +24,10 @@
endif
else
ifeq ($(LOCAL_SYSTEM_SHARED_LIBRARIES),none)
- my_system_shared_libraries := libc libm
+ my_system_shared_libraries := libc libm libdl
else
my_system_shared_libraries := $(LOCAL_SYSTEM_SHARED_LIBRARIES)
+ my_system_shared_libraries := $(patsubst libc,libc libdl,$(my_system_shared_libraries))
endif
endif
@@ -39,7 +40,7 @@
my_src_files_exclude := $(LOCAL_SRC_FILES_EXCLUDE)
my_static_libraries := $(LOCAL_STATIC_LIBRARIES)
my_whole_static_libraries := $(LOCAL_WHOLE_STATIC_LIBRARIES)
-my_shared_libraries := $(LOCAL_SHARED_LIBRARIES)
+my_shared_libraries := $(filter-out $(my_system_shared_libraries),$(LOCAL_SHARED_LIBRARIES))
my_header_libraries := $(LOCAL_HEADER_LIBRARIES)
my_cflags := $(LOCAL_CFLAGS)
my_conlyflags := $(LOCAL_CONLYFLAGS)
@@ -1362,7 +1363,7 @@
ifdef LOCAL_INSTALLED_MODULE
ifdef installed_shared_library_module_names
$(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)DEPENDENCIES_ON_SHARED_LIBRARIES += \
- $(my_register_name):$(LOCAL_INSTALLED_MODULE):$(subst $(space),$(comma),$(sort $(installed_shared_library_module_names)))
+ $(my_register_name):$(LOCAL_INSTALLED_MODULE):$(subst $(space),$(comma),$(installed_shared_library_module_names))
endif
endif
diff --git a/core/combo/javac.mk b/core/combo/javac.mk
index 7f66ea8..99bd0ee 100644
--- a/core/combo/javac.mk
+++ b/core/combo/javac.mk
@@ -23,6 +23,10 @@
JAVACC := $(ALTERNATE_JAVAC)
endif
+JAVA := java
+JAVADOC := javadoc
+JAR := jar
+
# The actual compiler can be wrapped by setting the JAVAC_WRAPPER var.
ifdef JAVAC_WRAPPER
ifneq ($(JAVAC_WRAPPER),$(firstword $(JAVACC)))
diff --git a/core/config.mk b/core/config.mk
index 66511c1..6ca45c0 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -517,7 +517,7 @@
DX_COMMAND := $(DX) -JXms16M -JXmx2048M
else
DX := $(DX_ALT_JAR)
-DX_COMMAND := java -Xms16M -Xmx2048M -jar $(DX)
+DX_COMMAND := $(JAVA) -Xms16M -Xmx2048M -jar $(DX)
endif
MAINDEXCLASSES := $(HOST_OUT_EXECUTABLES)/mainDexClasses
@@ -676,7 +676,7 @@
EMMA_JAR := external/emma/lib/emma$(COMMON_JAVA_PACKAGE_SUFFIX)
# Tool to merge AndroidManifest.xmls
-ANDROID_MANIFEST_MERGER := java -classpath prebuilts/devtools/tools/lib/manifest-merger.jar com.android.manifmerger.Main merge
+ANDROID_MANIFEST_MERGER := $(JAVA) -classpath prebuilts/devtools/tools/lib/manifest-merger.jar com.android.manifmerger.Main merge
COLUMN:= column
@@ -700,7 +700,7 @@
# Is the host JDK 64-bit version?
HOST_JDK_IS_64BIT_VERSION :=
-ifneq ($(filter 64-Bit, $(shell java -version 2>&1)),)
+ifneq ($(filter 64-Bit, $(shell $(JAVA) -version 2>&1)),)
HOST_JDK_IS_64BIT_VERSION := true
endif
endif # CALLED_FROM_SETUP not true
diff --git a/core/config_sanitizers.mk b/core/config_sanitizers.mk
index 04aedf4..967df2d 100644
--- a/core/config_sanitizers.mk
+++ b/core/config_sanitizers.mk
@@ -138,7 +138,7 @@
ifeq ($(filter address,$(my_sanitize)),)
$(error $(LOCAL_PATH): $(LOCAL_MODULE): Use of 'coverage' also requires 'address')
endif
- my_cflags += -fsanitize-coverage=edge,indirect-calls,8bit-counters,trace-cmp
+ my_cflags += -fsanitize-coverage=trace-pc-guard
my_sanitize := $(filter-out coverage,$(my_sanitize))
endif
diff --git a/core/cxx_stl_setup.mk b/core/cxx_stl_setup.mk
index fd9c442..0baec26 100644
--- a/core/cxx_stl_setup.mk
+++ b/core/cxx_stl_setup.mk
@@ -99,8 +99,6 @@
ifeq ($(my_link_type),static)
my_static_libraries += libm libc libdl
- else
- my_shared_libraries += libdl
endif
endif
else ifeq ($(my_cxx_stl),ndk)
diff --git a/core/definitions.mk b/core/definitions.mk
index 15ef6f4..fe8d644 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -2243,9 +2243,9 @@
$(if $(PRIVATE_JAR_MANIFEST), \
$(hide) sed -e "s/%BUILD_NUMBER%/$(BUILD_NUMBER_FROM_FILE)/" \
$(PRIVATE_JAR_MANIFEST) > $(dir $@)/manifest.mf && \
- jar -cfm $@ $(dir $@)/manifest.mf \
+ $(JAR) -cfm $@ $(dir $@)/manifest.mf \
-C $(PRIVATE_CLASS_INTERMEDIATES_DIR) ., \
- $(hide) jar -cf $@ -C $(PRIVATE_CLASS_INTERMEDIATES_DIR) .)
+ $(hide) $(JAR) -cf $@ -C $(PRIVATE_CLASS_INTERMEDIATES_DIR) .)
$(if $(PRIVATE_EXTRA_JAR_ARGS),$(call add-java-resources-to,$@))
endef
@@ -2516,7 +2516,7 @@
endef
define transform-classes.jar-to-emma
-$(hide) java -classpath $(EMMA_JAR) emma instr -outmode fullcopy -outfile \
+$(hide) $(JAVA) -classpath $(EMMA_JAR) emma instr -outmode fullcopy -outfile \
$(PRIVATE_EMMA_COVERAGE_FILE) -ip $< -d $(PRIVATE_EMMA_INTERMEDIATES_DIR) \
$(addprefix -ix , $(PRIVATE_EMMA_COVERAGE_FILTER))
endef
@@ -2539,7 +2539,7 @@
$(hide) rm -f $@ $@.tmp
@rm -rf $(dir $@)/desugar_dumped_classes
@mkdir $(dir $@)/desugar_dumped_classes
-$(hide) java \
+$(hide) $(JAVA) \
$(if $(EXPERIMENTAL_USE_OPENJDK9),--add-opens java.base/java.lang.invoke=ALL-UNNAMED,) \
-Djdk.internal.lambda.dumpProxyClasses=$(abspath $(dir $@))/desugar_dumped_classes \
-jar $(DESUGAR) \
@@ -2577,7 +2577,7 @@
define create-empty-package-at
@mkdir -p $(dir $(1))
$(hide) touch $(dir $(1))zipdummy
-$(hide) (cd $(dir $(1)) && jar cf $(notdir $(1)) zipdummy)
+$(hide) $(JAR) cf $(1) -C $(dir $(1)) zipdummy
$(hide) zip -qd $(1) zipdummy
$(hide) rm $(dir $(1))zipdummy
endef
@@ -2671,7 +2671,7 @@
#
define add-java-resources-to
$(call dump-words-to-file, $(PRIVATE_EXTRA_JAR_ARGS), $(1).jar-arg-list)
-$(hide) jar uf $(1) @$(1).jar-arg-list
+$(hide) $(JAR) uf $(1) @$(1).jar-arg-list
@rm -f $(1).jar-arg-list
endef
@@ -2683,7 +2683,7 @@
| sed -e "s?^$(PRIVATE_JACK_INTERMEDIATES_DIR)/? -C \"$(PRIVATE_JACK_INTERMEDIATES_DIR)\" \"?" -e "s/$$/\"/" \
> $(dir $@)jack_res_jar_flags; \
if [ -s $(dir $@)jack_res_jar_flags ] ; then \
- jar uf $@ @$(dir $@)jack_res_jar_flags; \
+ $(JAR) uf $@ @$(dir $@)jack_res_jar_flags; \
fi; \
fi
endef
@@ -2698,7 +2698,7 @@
# $(1): the package file we are signing.
define sign-package-arg
$(hide) mv $(1) $(1).unsigned
-$(hide) java -Djava.library.path=$(SIGNAPK_JNI_LIBRARY_PATH) \
+$(hide) $(JAVA) -Djava.library.path=$(SIGNAPK_JNI_LIBRARY_PATH) \
$(if $(EXPERIMENTAL_USE_OPENJDK9),--add-exports java.base/sun.security.pkcs=ALL-UNNAMED,) \
$(if $(EXPERIMENTAL_USE_OPENJDK9),--add-exports java.base/sun.security.x509=ALL-UNNAMED,) \
-jar $(SIGNAPK_JAR) \
diff --git a/core/droiddoc.mk b/core/droiddoc.mk
index eb12630..48a930d 100644
--- a/core/droiddoc.mk
+++ b/core/droiddoc.mk
@@ -179,7 +179,7 @@
$(call prepare-doc-source-list,$(PRIVATE_SRC_LIST_FILE),$(PRIVATE_JAVA_FILES), \
$(PRIVATE_SOURCE_INTERMEDIATES_DIR) $(PRIVATE_ADDITIONAL_JAVA_DIR))
$(hide) ( \
- javadoc \
+ $(JAVADOC) \
-encoding UTF-8 \
-source 1.8 \
\@$(PRIVATE_SRC_LIST_FILE) \
@@ -216,7 +216,7 @@
$(call prepare-doc-source-list,$(PRIVATE_SRC_LIST_FILE),$(PRIVATE_JAVA_FILES), \
$(PRIVATE_SOURCE_INTERMEDIATES_DIR) $(PRIVATE_ADDITIONAL_JAVA_DIR))
$(hide) ( \
- javadoc \
+ $(JAVADOC) \
-encoding UTF-8 \
$(PRIVATE_DROIDDOC_OPTIONS) \
\@$(PRIVATE_SRC_LIST_FILE) \
diff --git a/core/host_dalvik_java_library.mk b/core/host_dalvik_java_library.mk
index 7101229..4f3069f 100644
--- a/core/host_dalvik_java_library.mk
+++ b/core/host_dalvik_java_library.mk
@@ -119,7 +119,7 @@
$(full_classes_jarjar_jar): PRIVATE_JARJAR_RULES := $(LOCAL_JARJAR_RULES)
$(full_classes_jarjar_jar): $(full_classes_desugar_jar) $(LOCAL_JARJAR_RULES) | $(JARJAR)
@echo JarJar: $@
- $(hide) java -jar $(JARJAR) process $(PRIVATE_JARJAR_RULES) $< $@
+ $(hide) $(JAVA) -jar $(JARJAR) process $(PRIVATE_JARJAR_RULES) $< $@
else
full_classes_jarjar_jar := $(full_classes_desugar_jar)
endif
diff --git a/core/host_fuzz_test.mk b/core/host_fuzz_test.mk
index 1c9eed2..8622911 100644
--- a/core/host_fuzz_test.mk
+++ b/core/host_fuzz_test.mk
@@ -4,7 +4,7 @@
################################################
$(call record-module-type,HOST_FUZZ_TEST)
-LOCAL_CFLAGS += -fsanitize-coverage=edge,indirect-calls,8bit-counters,trace-cmp
+LOCAL_CFLAGS += -fsanitize-coverage=trace-pc-guard
LOCAL_STATIC_LIBRARIES += libLLVMFuzzer
include $(BUILD_HOST_EXECUTABLE)
diff --git a/core/host_java_library.mk b/core/host_java_library.mk
index d30c90d..939ff37 100644
--- a/core/host_java_library.mk
+++ b/core/host_java_library.mk
@@ -90,7 +90,7 @@
$(full_classes_jarjar_jar): PRIVATE_JARJAR_RULES := $(LOCAL_JARJAR_RULES)
$(full_classes_jarjar_jar): $(full_classes_compiled_jar) $(LOCAL_JARJAR_RULES) | $(JARJAR)
@echo JarJar: $@
- $(hide) java -jar $(JARJAR) process $(PRIVATE_JARJAR_RULES) $< $@
+ $(hide) $(JAVA) -jar $(JARJAR) process $(PRIVATE_JARJAR_RULES) $< $@
else
full_classes_jarjar_jar := $(full_classes_compiled_jar)
endif
diff --git a/core/java.mk b/core/java.mk
index 8dc4b22..e456993 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -463,7 +463,7 @@
$(full_classes_processed_jar): $(full_classes_compiled_jar) $(LOCAL_JAR_PROCESSOR)
@echo Processing $@ with $(PRIVATE_JAR_PROCESSOR)
$(hide) rm -f $@ $(PRIVATE_TMP_OUT)
- $(hide) java -jar $(PRIVATE_JAR_PROCESSOR) $(PRIVATE_JAR_PROCESSOR_ARGS)
+ $(hide) $(JAVA) -jar $(PRIVATE_JAR_PROCESSOR) $(PRIVATE_JAR_PROCESSOR_ARGS)
$(hide) mv $(PRIVATE_TMP_OUT) $@
else
@@ -489,7 +489,7 @@
$(full_classes_jarjar_jar): PRIVATE_JARJAR_RULES := $(LOCAL_JARJAR_RULES)
$(full_classes_jarjar_jar): $(full_classes_desugar_jar) $(LOCAL_JARJAR_RULES) | $(JARJAR)
@echo JarJar: $@
- $(hide) java -jar $(JARJAR) process $(PRIVATE_JARJAR_RULES) $< $@
+ $(hide) $(JAVA) -jar $(JARJAR) process $(PRIVATE_JARJAR_RULES) $< $@
else
full_classes_jarjar_jar := $(full_classes_desugar_jar)
endif
diff --git a/core/package_internal.mk b/core/package_internal.mk
index 6255ef1..8b3c375 100644
--- a/core/package_internal.mk
+++ b/core/package_internal.mk
@@ -355,7 +355,7 @@
@rm -rf $(PRIVATE_INTERMEDIATES) $(PRIVATE_SRC_OUT) && \
mkdir -p $(PRIVATE_INTERMEDIATES) $(PRIVATE_SRC_OUT) \
$(PRIVATE_XML_OUT) $(PRIVATE_RES_OUT) $(PRIVATE_ANNO_SRC_DIR)
- $(hide) java -classpath $(DATA_BINDING_COMPILER) android.databinding.tool.MakeCopy \
+ $(hide) $(JAVA) -classpath $(DATA_BINDING_COMPILER) android.databinding.tool.MakeCopy \
$(PRIVATE_MANIFEST) $(PRIVATE_SRC_OUT) $(PRIVATE_XML_OUT) $(PRIVATE_RES_OUT) $(PRIVATE_RES_IN)
$(hide) touch $@
diff --git a/core/product.mk b/core/product.mk
index 34cd21c..ab65ea5 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -130,6 +130,7 @@
VENDOR_PRODUCT_RESTRICT_VENDOR_FILES \
VENDOR_EXCEPTION_MODULES \
VENDOR_EXCEPTION_PATHS \
+ PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD \
PRODUCT_ART_USE_READ_BARRIER \
PRODUCT_IOT \
PRODUCT_SYSTEM_HEADROOM \
diff --git a/core/product_config.mk b/core/product_config.mk
index 2b2d7b3..d27bdf3 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -408,6 +408,10 @@
$(eval SANITIZER.$(TARGET_PRODUCT).$(m).CONFIG := $(cf))))
_psmc_modules :=
+# Whether the product wants to ship libartd. For rules and meaning, see art/Android.mk.
+PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD := \
+ $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD))
+
# Make this art variable visible to soong_config.mk.
PRODUCT_ART_USE_READ_BARRIER := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ART_USE_READ_BARRIER))
diff --git a/core/static_java_library.mk b/core/static_java_library.mk
index 343b949..db64a8d 100644
--- a/core/static_java_library.mk
+++ b/core/static_java_library.mk
@@ -199,7 +199,7 @@
# Note: Use "cp -n" to honor the resource overlay rules, if multiple res dirs exist.
$(hide) $(foreach res,$(PRIVATE_RESOURCE_DIR),cp -Rfn $(res)/* $(dir $@)aar/res;)
$(hide) cp $(PRIVATE_R_TXT) $(dir $@)aar/R.txt
- $(hide) jar -cMf $@ \
+ $(hide) $(JAR) -cMf $@ \
-C $(dir $@)aar .
# Register the aar file.
diff --git a/core/tasks/sdk-addon.mk b/core/tasks/sdk-addon.mk
index 362b229..610e0ce 100644
--- a/core/tasks/sdk-addon.mk
+++ b/core/tasks/sdk-addon.mk
@@ -35,7 +35,7 @@
define stub-addon-jar
$(call stub-addon-jar-file,$(1)): $(1) | mkstubs
$(info Stubbing addon jar using $(PRODUCT_SDK_ADDON_STUB_DEFS))
- $(hide) java -jar $(call module-installed-files,mkstubs) $(if $(hide),,--v) \
+ $(hide) $(JAVA) -jar $(call module-installed-files,mkstubs) $(if $(hide),,--v) \
"$$<" "$$@" @$(PRODUCT_SDK_ADDON_STUB_DEFS)
endef