summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/Makefile299
-rw-r--r--core/armelf.x10
-rw-r--r--core/armelflib.x10
-rw-r--r--core/base_rules.mk10
-rw-r--r--core/binary.mk127
-rw-r--r--core/build_id.mk2
-rw-r--r--core/clear_vars.mk6
-rw-r--r--core/combo/HOST_darwin-x86.mk42
-rw-r--r--core/combo/HOST_linux-x86.mk24
-rw-r--r--core/combo/HOST_windows-x86.mk12
-rw-r--r--core/combo/TARGET_linux-arm.mk20
-rw-r--r--core/combo/TARGET_linux-sh.mk4
-rw-r--r--core/combo/TARGET_linux-x86.mk82
-rw-r--r--core/combo/arch/arm/armv7-a-neon.mk1
-rw-r--r--core/combo/arch/arm/armv7-a.mk1
-rw-r--r--core/combo/arch/x86/x86-atom.mk18
-rw-r--r--core/combo/arch/x86/x86.mk35
-rw-r--r--core/combo/select.mk2
-rw-r--r--core/config.mk83
-rw-r--r--core/definitions.mk63
-rw-r--r--core/dex_preopt.mk2
-rw-r--r--core/droiddoc.mk14
-rw-r--r--core/dumpvar.mk26
-rw-r--r--core/envsetup.mk24
-rwxr-xr-xcore/find-jdk-tools-jar.sh1
-rw-r--r--core/host_java_library.mk2
-rw-r--r--core/java.mk31
-rw-r--r--core/java_library.mk3
-rw-r--r--core/legacy_prebuilts.mk1
-rw-r--r--core/llvm_config.mk66
-rw-r--r--core/main.mk124
-rw-r--r--core/pathmap.mk10
-rw-r--r--core/pdk_config.mk66
-rw-r--r--core/product.mk7
-rw-r--r--core/product_config.mk4
-rw-r--r--core/static_java_library.mk83
-rw-r--r--core/tasks/apicheck.mk3
-rw-r--r--core/tasks/collect_gpl_sources.mk30
-rw-r--r--core/tasks/cts.mk87
-rw-r--r--core/tasks/vendor_module_check.mk80
-rw-r--r--core/user_tags.mk6
-rw-r--r--core/version_defaults.mk4
42 files changed, 1070 insertions, 455 deletions
diff --git a/core/Makefile b/core/Makefile
index 81699ee..11a897a 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -9,6 +9,8 @@ else
FILE_NAME_TAG := $(BUILD_NUMBER)
endif
+is_tests_build := $(filter tests,$(MAKECMDGOALS))
+
# -----------------------------------------------------------------
# Define rules to copy PRODUCT_COPY_FILES defined by the product.
# PRODUCT_COPY_FILES contains words like <source file>:<dest file>.
@@ -26,7 +28,8 @@ $(foreach cf,$(PRODUCT_COPY_FILES), \
$(eval _src := $(call word-colon,1,$(cf))) \
$(eval _dest := $(call word-colon,2,$(cf))) \
$(call check-product-copy-files,$(cf)) \
- $(if $(filter $(unique_product_copy_files_destinations),$(_dest)),, \
+ $(if $(filter $(unique_product_copy_files_destinations),$(_dest)), \
+ $(info PRODUCT_COPY_FILES $(cf) ignored.), \
$(eval _fulldest := $(call append-path,$(PRODUCT_OUT),$(_dest))) \
$(eval $(call copy-one-file,$(_src),$(_fulldest))) \
$(eval ALL_DEFAULT_INSTALLED_MODULES += $(_fulldest)) \
@@ -35,11 +38,13 @@ unique_product_copy_files_destinations :=
# -----------------------------------------------------------------
# docs/index.html
+ifeq (,$(TARGET_BUILD_APPS))
gen := $(OUT_DOCS)/index.html
ALL_DOCS += $(gen)
$(gen): frameworks/base/docs/docs-redirect-index.html
@mkdir -p $(dir $@)
@cp -f $< $@
+endif
# -----------------------------------------------------------------
# default.prop
@@ -405,6 +410,11 @@ endif
# -----------------------------------------------------------------
# NOTICE files
#
+# We are required to publish the licenses for all code under BSD, GPL and
+# Apache licenses (and possibly other more exotic ones as well). We err on the
+# side of caution, so the licenses for other third-party code are included here
+# too.
+#
# This needs to be before the systemimage rules, because it adds to
# ALL_DEFAULT_INSTALLED_MODULES, which those use to pick which files
# go into the systemimage.
@@ -432,78 +442,9 @@ endif
# Then we could traverse that without quite as much bash drama.
define combine-notice-files
$(1) $(2): PRIVATE_MESSAGE := $(3)
-$(1) $(2) $(4)/hash-timestamp: PRIVATE_DIR := $(4)
-$(4)/hash-timestamp: $(5) $(BUILD_SYSTEM)/Makefile
- @echo Finding NOTICE files: $$@
- $$(hide) rm -rf $$@ $$(PRIVATE_DIR)/hash
- $$(hide) mkdir -p $$(PRIVATE_DIR)/hash
- $$(hide) for file in $$$$(find $$(PRIVATE_DIR)/src -type f); do \
- hash=$$$$($(MD5SUM) $$$$file | sed -e "s/ .*//"); \
- hashfile=$$(PRIVATE_DIR)/hash/$$$$hash; \
- echo $$$$file >> $$$$hashfile; \
- done
- $$(hide) touch $$@
-$(1): $(4)/hash-timestamp
- @echo Combining NOTICE files: $$@
- $$(hide) mkdir -p $$(dir $$@)
- $$(hide) echo $$(PRIVATE_MESSAGE) > $$@
- $$(hide) find $$(PRIVATE_DIR)/hash -type f | xargs cat | sort | \
- sed -e "s:$$(PRIVATE_DIR)/src\(.*\)\.txt: \1:" >> $$@
- $$(hide) echo >> $$@
- $$(hide) echo >> $$@
- $$(hide) echo >> $$@
- $$(hide) for hashfile in $$$$(find $$(PRIVATE_DIR)/hash -type f); do \
- echo "============================================================"\
- >> $$@; \
- echo "Notices for file(s):" >> $$@; \
- cat $$$$hashfile | sort | \
- sed -e "s:$$(PRIVATE_DIR)/src\(.*\)\.txt: \1:" >> \
- $$@; \
- echo "------------------------------------------------------------"\
- >> $$@; \
- echo >> $$@; \
- orig=$$$$(head -n 1 $$$$hashfile); \
- cat $$$$orig >> $$@; \
- echo >> $$@; \
- echo >> $$@; \
- echo >> $$@; \
- done
-$(2): $(4)/hash-timestamp
- @echo Combining NOTICE files: $$@
- $$(hide) mkdir -p $$(dir $$@)
- $$(hide) echo "<html><head>" > $$@
- $$(hide) echo "<style type=\"text/css\">" >> $$@
- $$(hide) echo "body { padding: 0; font-family: sans-serif; }" >> $$@
- $$(hide) echo ".same-license { background-color: #eeeeee; border-top: 20px solid white; padding: 10px; }" >> $$@
- $$(hide) echo ".label { font-weight: bold; }" >> $$@
- $$(hide) echo ".file-list { margin-left: 1em; font-color: blue; }" >> $$@
- $$(hide) echo "</style>" >> $$@
- $$(hide) echo "</head><body topmargin=\"0\" leftmargin=\"0\" rightmargin=\"0\" bottommargin=\"0\">" >> $$@
- $$(hide) echo "<table cellpading=\"0\" cellspacing=\"0\" border=\"0\">" \
- >> $$@
- $$(hide) for hashfile in $$$$(find $$(PRIVATE_DIR)/hash -type f); do \
- cat $$$$hashfile | sort | \
- sed -e "s:$$(PRIVATE_DIR)/src\(.*\)\.txt: <a name=\"\1\"></a>:" >> \
- $$@; \
- echo "<tr><td class=\"same-license\">" >> $$@; \
- echo "<div class=\"label\">Notices for file(s):</div>" >> $$@; \
- echo "<div class=\"file-list\">" >> $$@; \
- cat $$$$hashfile | sort | \
- sed -e "s:$$(PRIVATE_DIR)/src\(.*\)\.txt: \1<br/>:" >> $$@; \
- echo "</div><!-- file-list -->" >> $$@; \
- echo >> $$@; \
- orig=$$$$(head -n 1 $$$$hashfile); \
- echo "<pre class=\"license-text\">" >> $$@; \
- cat $$$$orig | sed -e "s/\&/\&amp;/g" | sed -e "s/</\&lt;/g" \
- | sed -e "s/>/\&gt;/g" >> $$@; \
- echo "</pre><!-- license-text -->" >> $$@; \
- echo "</td></tr><!-- same-license -->" >> $$@; \
- echo >> $$@; \
- echo >> $$@; \
- echo >> $$@; \
- done
- $$(hide) echo "</table>" >> $$@
- $$(hide) echo "</body></html>" >> $$@
+$(1) $(2): PRIVATE_DIR := $(4)
+$(1) $(2): $(5) $(BUILD_SYSTEM)/Makefile build/tools/generate-notice-files.py
+ build/tools/generate-notice-files.py $(1) $(2) $$(PRIVATE_MESSAGE) $$(PRIVATE_DIR)/src
notice_files: $(1) $(2)
endef
@@ -553,7 +494,7 @@ endif
# make the target NOTICE files depend on this particular file too, which will
# then be in the right directory for the find in combine-notice-files to work.
$(kernel_notice_file): \
- prebuilt/$(TARGET_PREBUILT_TAG)/kernel/LINUX_KERNEL_COPYING \
+ prebuilts/qemu-kernel/arm/LINUX_KERNEL_COPYING \
| $(ACP)
@echo Copying: $@
$(hide) mkdir -p $(dir $@)
@@ -603,27 +544,27 @@ endif
ifeq ($(INTERNAL_USERIMAGES_USE_EXT),true)
INTERNAL_USERIMAGES_DEPS := $(MKEXTUSERIMG) $(MAKE_EXT4FS)
-INTERNAL_USERIMAGES_BINARY_PATHS := $(sort $(dir $(INTERNAL_USERIMAGES_DEPS)))
-
-# $(1): src directory
-# $(2): output file
-# $(3): mount point
-# $(4): ext variant (ext2, ext3, ext4)
-# $(5): size of the partition
-define build-userimage-ext-target
- @mkdir -p $(dir $(2))
- $(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH \
- $(MKEXTUSERIMG) $(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG) $(1) $(2) $(4) $(3) $(5)
-endef
else
INTERNAL_USERIMAGES_DEPS := $(MKYAFFS2)
endif
+INTERNAL_USERIMAGES_BINARY_PATHS := $(sort $(dir $(INTERNAL_USERIMAGES_DEPS)))
+
+# $(1): the path of the output dictionary file
+define generate-userimage-prop-dictionary
+$(if $(INTERNAL_USERIMAGES_EXT_VARIANT),$(hide) echo "fs_type=$(INTERNAL_USERIMAGES_EXT_VARIANT)" >> $(1))
+$(if $(BOARD_SYSTEMIMAGE_PARTITION_SIZE),$(hide) echo "system_size=$(BOARD_SYSTEMIMAGE_PARTITION_SIZE)" >> $(1))
+$(if $(BOARD_USERDATAIMAGE_PARTITION_SIZE),$(hide) echo "userdata_size=$(BOARD_USERDATAIMAGE_PARTITION_SIZE)" >> $(1))
+$(if $(BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE),$(hide) echo "cache_fs_type=$(BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE)" >> $(1))
+$(if $(BOARD_CACHEIMAGE_PARTITION_SIZE),$(hide) echo "cache_size=$(BOARD_CACHEIMAGE_PARTITION_SIZE)" >> $(1))
+$(if $(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG),$(hide) echo "extfs_sparse_flag=$(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG)" >> $(1))
+$(if $(mkyaffs2_extra_flags),$(hide) echo "mkyaffs2_extra_flags=$(mkyaffs2_extra_flags)" >> $(1))
+endef
# -----------------------------------------------------------------
# Recovery image
# If neither TARGET_NO_KERNEL nor TARGET_NO_RECOVERY are true
-ifeq (,$(filter true, $(TARGET_NO_KERNEL) $(TARGET_NO_RECOVERY) $(BUILD_TINY_ANDROID)))
+ifeq (,$(filter true, $(TARGET_NO_KERNEL) $(TARGET_NO_RECOVERY) $(BUILD_TINY_ANDROID) $(TARGET_BUILD_PDK)))
INSTALLED_RECOVERYIMAGE_TARGET := $(PRODUCT_OUT)/recovery.img
@@ -740,10 +681,19 @@ endif
#
INTERNAL_SYSTEMIMAGE_FILES := $(filter $(TARGET_OUT)/%, \
- $(ALL_PREBUILT) \
- $(ALL_COPIED_HEADERS) \
- $(ALL_GENERATED_SOURCES) \
- $(ALL_DEFAULT_INSTALLED_MODULES))
+ $(ALL_PREBUILT) \
+ $(ALL_COPIED_HEADERS) \
+ $(ALL_GENERATED_SOURCES) \
+ $(ALL_DEFAULT_INSTALLED_MODULES)\
+ $(ALL_PDK_FUSION_FILES))
+
+ifdef is_tests_build
+# We don't want to install tests modules to the system partition
+# when building "tests", because now "tests" may be built in a user, userdebug
+# or eng build variant and we don't want to pollute the system partition.
+# INTERNAL_SYSTEMIMAGE_FILES += $(filter $(TARGET_OUT)/%, \
+# $(tests_MODULES))
+endif
FULL_SYSTEMIMAGE_DEPS := $(INTERNAL_SYSTEMIMAGE_FILES) $(INTERNAL_USERIMAGES_DEPS)
# -----------------------------------------------------------------
@@ -769,27 +719,18 @@ $(call dist-for-goals, sdk_addon, $(INSTALLED_FILES_FILE))
endif
systemimage_intermediates := \
- $(call intermediates-dir-for,PACKAGING,systemimage)
+ $(call intermediates-dir-for,PACKAGING,systemimage)
BUILT_SYSTEMIMAGE := $(systemimage_intermediates)/system.img
-ifeq ($(INTERNAL_USERIMAGES_USE_EXT),true)
-## generate an ext image
-# $(1): output file
-define build-systemimage-target
- @echo "Target system fs image: $(1)"
- $(call build-userimage-ext-target,$(TARGET_OUT),$(1),system,$(INTERNAL_USERIMAGES_EXT_VARIANT),$(BOARD_SYSTEMIMAGE_PARTITION_SIZE))
-endef
-
-else # INTERNAL_USERIMAGES_USE_EXT != true
-
-## generate a yaffs2 image
# $(1): output file
define build-systemimage-target
- @echo "Target system fs image: $(1)"
- @mkdir -p $(dir $(1))
- $(hide) $(MKYAFFS2) -f $(mkyaffs2_extra_flags) $(TARGET_OUT) $(1)
+ @echo "Target system fs image: $(1)"
+ @mkdir -p $(dir $(1)) $(systemimage_intermediates) && rm -rf $(systemimage_intermediates)/system_image_info.txt
+ $(call generate-userimage-prop-dictionary, $(systemimage_intermediates)/system_image_info.txt)
+ $(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH \
+ ./build/tools/releasetools/build_image.py \
+ $(TARGET_OUT) $(systemimage_intermediates)/system_image_info.txt $(1)
endef
-endif # INTERNAL_USERIMAGES_USE_EXT
$(BUILT_SYSTEMIMAGE): $(FULL_SYSTEMIMAGE_DEPS) $(INSTALLED_FILES_FILE)
$(call build-systemimage-target,$@)
@@ -829,6 +770,12 @@ systemimage-nodeps snod: $(filter-out systemimage-nodeps snod,$(MAKECMDGOALS)) \
$(call build-systemimage-target,$(INSTALLED_SYSTEMIMAGE))
$(hide) $(call assert-max-image-size,$(INSTALLED_SYSTEMIMAGE),$(BOARD_SYSTEMIMAGE_PARTITION_SIZE),yaffs)
+ifneq (,$(filter systemimage-nodeps snod, $(MAKECMDGOALS)))
+ifeq (true,$(WITH_DEXPREOPT))
+$(warning Warning: with dexpreopt enabled, you may need a full rebuild.)
+endif
+endif
+
#######
## system tarball
define build-systemtarball-target
@@ -856,6 +803,21 @@ systemtarball-nodeps: $(FS_GET_STATS) \
.PHONY: stnod
stnod: systemtarball-nodeps
+#######
+## platform.zip: system in a zip file
+INSTALLED_PLATFROM_ZIP := $(PRODUCT_OUT)/platform.zip
+$(INSTALLED_PLATFROM_ZIP) : $(INTERNAL_SYSTEMIMAGE_FILES)
+ $(call pretty,"Platform zip package: $(INSTALLED_PLATFROM_ZIP)")
+ $(hide) rm -f $@
+ $(hide) cd $(dir $@) && zip -qry $(notdir $@) system
+
+.PHONY: platform
+platform: $(INSTALLED_PLATFROM_ZIP)
+
+# Dist the platform.zip
+ifneq (,$(filter platform, $(MAKECMDGOALS)))
+$(call dist-for-goals, platform, $(INSTALLED_PLATFROM_ZIP))
+endif
#######
## boot tarball
@@ -888,29 +850,28 @@ boottarball-nodeps btnod: $(FS_GET_STATS) \
# -----------------------------------------------------------------
# data partition image
INTERNAL_USERDATAIMAGE_FILES := \
- $(filter $(TARGET_OUT_DATA)/%,$(ALL_DEFAULT_INSTALLED_MODULES))
+ $(filter $(TARGET_OUT_DATA)/%,$(ALL_DEFAULT_INSTALLED_MODULES))
-ifeq ($(INTERNAL_USERIMAGES_USE_EXT),true)
-## Generate an ext2 image
-define build-userdataimage-target
- $(call pretty,"Target userdata fs image: $(INSTALLED_USERDATAIMAGE_TARGET)")
- @mkdir -p $(TARGET_OUT_DATA)
- $(call build-userimage-ext-target,$(TARGET_OUT_DATA),$(INSTALLED_USERDATAIMAGE_TARGET),data,$(INTERNAL_USERIMAGES_EXT_VARIANT),$(BOARD_USERDATAIMAGE_PARTITION_SIZE))
- $(hide) $(call assert-max-image-size,$(INSTALLED_USERDATAIMAGE_TARGET),$(BOARD_USERDATAIMAGE_PARTITION_SIZE),yaffs)
-endef
+# If we build "tests" at the same time, make sure $(tests_MODULES) get covered.
+ifdef is_tests_build
+INTERNAL_USERDATAIMAGE_FILES += \
+ $(filter $(TARGET_OUT_DATA)/%,$(tests_MODULES))
+endif
-else # INTERNAL_USERIMAGES_USE_EXT != true
+userdataimage_intermediates := \
+ $(call intermediates-dir-for,PACKAGING,userdata)
+BUILT_USERDATAIMAGE_TARGET := $(PRODUCT_OUT)/userdata.img
-## Generate a yaffs2 image
define build-userdataimage-target
- $(call pretty,"Target userdata fs image: $(INSTALLED_USERDATAIMAGE_TARGET)")
- @mkdir -p $(TARGET_OUT_DATA)
- $(hide) $(MKYAFFS2) -f $(mkyaffs2_extra_flags) $(TARGET_OUT_DATA) $(INSTALLED_USERDATAIMAGE_TARGET)
- $(hide) $(call assert-max-image-size,$(INSTALLED_USERDATAIMAGE_TARGET),$(BOARD_USERDATAIMAGE_PARTITION_SIZE),yaffs)
+ $(call pretty,"Target userdata fs image: $(INSTALLED_USERDATAIMAGE_TARGET)")
+ @mkdir -p $(TARGET_OUT_DATA)
+ @mkdir -p $(userdataimage_intermediates) && rm -rf $(userdataimage_intermediates)/userdata_image_info.txt
+ $(call generate-userimage-prop-dictionary, $(userdataimage_intermediates)/userdata_image_info.txt)
+ $(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH \
+ ./build/tools/releasetools/build_image.py \
+ $(TARGET_OUT_DATA) $(userdataimage_intermediates)/userdata_image_info.txt $(INSTALLED_USERDATAIMAGE_TARGET)
+ $(hide) $(call assert-max-image-size,$(INSTALLED_USERDATAIMAGE_TARGET),$(BOARD_USERDATAIMAGE_PARTITION_SIZE),yaffs)
endef
-endif # INTERNAL_USERIMAGES_USE_EXT
-
-BUILT_USERDATAIMAGE_TARGET := $(PRODUCT_OUT)/userdata.img
# We just build this directly to the install location.
INSTALLED_USERDATAIMAGE_TARGET := $(BUILT_USERDATAIMAGE_TARGET)
@@ -944,6 +905,38 @@ userdatatarball-nodeps: $(FS_GET_STATS)
# -----------------------------------------------------------------
+# cache partition image
+ifdef BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE
+INTERNAL_CACHEIMAGE_FILES := \
+ $(filter $(TARGET_OUT_CACHE)/%,$(ALL_DEFAULT_INSTALLED_MODULES))
+
+cacheimage_intermediates := \
+ $(call intermediates-dir-for,PACKAGING,cache)
+BUILT_CACHEIMAGE_TARGET := $(PRODUCT_OUT)/cache.img
+
+define build-cacheimage-target
+ $(call pretty,"Target cache fs image: $(INSTALLED_CACHEIMAGE_TARGET)")
+ @mkdir -p $(TARGET_OUT_CACHE)
+ @mkdir -p $(cacheimage_intermediates) && rm -rf $(cacheimage_intermediates)/cache_image_info.txt
+ $(call generate-userimage-prop-dictionary, $(cacheimage_intermediates)/cache_image_info.txt)
+ $(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH \
+ ./build/tools/releasetools/build_image.py \
+ $(TARGET_OUT_CACHE) $(cacheimage_intermediates)/cache_image_info.txt $(INSTALLED_CACHEIMAGE_TARGET)
+ $(hide) $(call assert-max-image-size,$(INSTALLED_CACHEIMAGE_TARGET),$(BOARD_CACHEIMAGE_PARTITION_SIZE),yaffs)
+endef
+
+# We just build this directly to the install location.
+INSTALLED_CACHEIMAGE_TARGET := $(BUILT_CACHEIMAGE_TARGET)
+$(INSTALLED_CACHEIMAGE_TARGET): $(INTERNAL_USERIMAGES_DEPS) $(INTERNAL_CACHEIMAGE_FILES)
+ $(build-cacheimage-target)
+
+.PHONY: cacheimage-nodeps
+cacheimage-nodeps: | $(INTERNAL_USERIMAGES_DEPS)
+ $(build-cacheimage-target)
+
+endif # BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE
+
+# -----------------------------------------------------------------
# bring in the installer image generation defines if necessary
ifeq ($(TARGET_USE_DISKINSTALLER),true)
include bootable/diskinstaller/config.mk
@@ -1024,6 +1017,7 @@ $(BUILT_TARGET_FILES_PACKAGE): \
$(INSTALLED_RECOVERYIMAGE_TARGET) \
$(INSTALLED_SYSTEMIMAGE) \
$(INSTALLED_USERDATAIMAGE_TARGET) \
+ $(INSTALLED_CACHEIMAGE_TARGET) \
$(INSTALLED_ANDROID_INFO_TXT_TARGET) \
$(built_ota_tools) \
$(APKCERTS_FILE) \
@@ -1100,23 +1094,12 @@ endif
ifdef BOARD_RECOVERYIMAGE_PARTITION_SIZE
$(hide) echo "recovery_size=$(BOARD_RECOVERYIMAGE_PARTITION_SIZE)" >> $(zip_root)/META/misc_info.txt
endif
-ifdef BOARD_SYSTEMIMAGE_PARTITION_SIZE
- $(hide) echo "system_size=$(BOARD_SYSTEMIMAGE_PARTITION_SIZE)" >> $(zip_root)/META/misc_info.txt
-endif
-ifdef BOARD_USERDATAIMAGE_PARTITION_SIZE
- $(hide) echo "userdata_size=$(BOARD_USERDATAIMAGE_PARTITION_SIZE)" >> $(zip_root)/META/misc_info.txt
-endif
$(hide) echo "tool_extensions=$(tool_extensions)" >> $(zip_root)/META/misc_info.txt
-ifdef mkyaffs2_extra_flags
- $(hide) echo "mkyaffs2_extra_flags=$(mkyaffs2_extra_flags)" >> $(zip_root)/META/misc_info.txt
-endif
-ifdef INTERNAL_USERIMAGES_SPARSE_EXT_FLAG
- $(hide) echo "extfs_sparse_flag=$(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG)" >> $(zip_root)/META/misc_info.txt
-endif
$(hide) echo "default_system_dev_certificate=$(DEFAULT_SYSTEM_DEV_CERTIFICATE)" >> $(zip_root)/META/misc_info.txt
ifdef PRODUCT_EXTRA_RECOVERY_KEYS
$(hide) echo "extra_recovery_keys=$(PRODUCT_EXTRA_RECOVERY_KEYS)" >> $(zip_root)/META/misc_info.txt
endif
+ $(call generate-userimage-prop-dictionary, $(zip_root)/META/misc_info.txt)
@# Zip everything up, preserving symlinks
$(hide) (cd $(zip_root) && zip -qry ../$(notdir $@) .)
@# Run fs_config on all the system, boot ramdisk, and recovery ramdisk files in the zip, and save the output
@@ -1193,7 +1176,7 @@ endif # TARGET_PRODUCT != sdk
# -----------------------------------------------------------------
# A zip of the tests that are built when running "make tests".
# This is very similar to BUILT_TARGET_FILES_PACKAGE, but we
-# only grab SYSTEM and DATA, and it's called "*-tests-*.zip".
+# only grab DATA, and it's called "*-tests-*.zip".
#
name := $(TARGET_PRODUCT)
ifeq ($(TARGET_BUILD_TYPE),debug)
@@ -1206,25 +1189,14 @@ BUILT_TESTS_ZIP_PACKAGE := $(intermediates)/$(name).zip
$(BUILT_TESTS_ZIP_PACKAGE): intermediates := $(intermediates)
$(BUILT_TESTS_ZIP_PACKAGE): zip_root := $(intermediates)/$(name)
-# Depending on the dependencies of system image and userdata image.
-# But we don't need to really create them.
+# Depending on the images guarantees that the underlying
# directories are up-to-date.
$(BUILT_TESTS_ZIP_PACKAGE): \
- $(FULL_SYSTEMIMAGE_DEPS) \
- $(INTERNAL_USERDATAIMAGE_FILES) \
- | $(ACP)
+ $(INSTALLED_USERDATAIMAGE_TARGET) \
+ | $(ACP)
@echo "Package test files: $@"
$(hide) rm -rf $@ $(zip_root)
$(hide) mkdir -p $(dir $@) $(zip_root)
- @# Some parts of the system image
- $(hide) $(call package_files-copy-root, \
- $(SYSTEMIMAGE_SOURCE_DIR)/xbin,$(zip_root)/SYSTEM/xbin)
- $(hide) $(call package_files-copy-root, \
- $(SYSTEMIMAGE_SOURCE_DIR)/lib,$(zip_root)/SYSTEM/lib)
- $(hide) $(call package_files-copy-root, \
- $(SYSTEMIMAGE_SOURCE_DIR)/framework, \
- $(zip_root)/SYSTEM/framework)
- $(hide) $(ACP) $(SYSTEMIMAGE_SOURCE_DIR)/build.prop $(zip_root)/SYSTEM
@# Contents of the data image
$(hide) $(call package_files-copy-root, \
$(TARGET_OUT_DATA),$(zip_root)/DATA)
@@ -1242,6 +1214,12 @@ ifneq (,$(filter $(MAKECMDGOALS),tests-build-target))
$(BUILT_TESTS_ZIP_PACKAGE))
endif
+.PHONY: tests
+tests: $(BUILT_TESTS_ZIP_PACKAGE)
+ifneq (,$(filter tests, $(MAKECMDGOALS)))
+$(call dist-for-goals, tests, $(BUILT_TESTS_ZIP_PACKAGE))
+endif
+
# -----------------------------------------------------------------
# A zip of the symbols directory. Keep the full paths to make it
# more obvious where these files came from.
@@ -1297,7 +1275,7 @@ dalvikfiles: $(INTERNAL_DALVIK_MODULES)
INTERNAL_EMULATOR_PACKAGE_FILES += \
$(HOST_OUT_EXECUTABLES)/emulator$(HOST_EXECUTABLE_SUFFIX) \
- prebuilt/android-$(TARGET_ARCH)/kernel/kernel-qemu \
+ prebuilts/qemu-kernel/$(TARGET_ARCH)/kernel-qemu \
$(INSTALLED_RAMDISK_TARGET) \
$(INSTALLED_SYSTEMIMAGE) \
$(INSTALLED_USERDATAIMAGE_TARGET)
@@ -1311,11 +1289,13 @@ $(INTERNAL_EMULATOR_PACKAGE_TARGET): $(INTERNAL_EMULATOR_PACKAGE_FILES)
$(hide) zip -qj $@ $(INTERNAL_EMULATOR_PACKAGE_FILES)
# -----------------------------------------------------------------
+# Old PDK stuffs, retired
# The pdk package (Platform Development Kit)
-ifneq (,$(filter pdk,$(MAKECMDGOALS)))
- include development/pdk/Pdk.mk
-endif
+#ifneq (,$(filter pdk,$(MAKECMDGOALS)))
+# include development/pdk/Pdk.mk
+#endif
+
# -----------------------------------------------------------------
# The SDK
@@ -1368,6 +1348,12 @@ sdk_tools_atree_files := sdk/build/tools.atree
ifneq (,$(strip $(wildcard sdk/build/tools.$(TARGET_ARCH).atree)))
sdk_tools_atree_files += sdk/build/tools.$(TARGET_ARCH).atree
endif
+ifneq (,$(strip $(wildcard sdk/build/tools.$(HOST_OS).atree)))
+ sdk_tools_atree_files += sdk/build/tools.$(HOST_OS).atree
+endif
+ifneq (,$(strip $(wildcard sdk/build/tools.$(HOST_OS)-$(HOST_ARCH).atree)))
+ sdk_tools_atree_files += sdk/build/tools.$(HOST_OS)-$(HOST_ARCH).atree
+endif
sdk_atree_files := \
$(atree_dir)/sdk.exclude.atree \
@@ -1430,6 +1416,7 @@ $(INTERNAL_SDK_TARGET): $(deps)
-I $(TARGET_COMMON_OUT_ROOT) \
-v "PLATFORM_NAME=android-$(PLATFORM_VERSION)" \
-v "OUT_DIR=$(OUT_DIR)" \
+ -v "HOST_OUT=$(HOST_OUT)" \
-v "TARGET_ARCH=$(TARGET_ARCH)" \
-v "TARGET_CPU_ABI=$(TARGET_CPU_ABI)" \
-v "DLL_EXTENSION=$(HOST_SHLIB_SUFFIX)" \
diff --git a/core/armelf.x b/core/armelf.x
index d38dc1d..b484776 100644
--- a/core/armelf.x
+++ b/core/armelf.x
@@ -93,10 +93,16 @@ SECTIONS
.preinit_array : { KEEP (*(.preinit_array)) }
PROVIDE (__preinit_array_end = .);
PROVIDE (__init_array_start = .);
- .init_array : { KEEP (*(.init_array)) }
+ .init_array : {
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array))
+ }
PROVIDE (__init_array_end = .);
PROVIDE (__fini_array_start = .);
- .fini_array : { KEEP (*(.fini_array)) }
+ .fini_array : {
+ KEEP (*(.fini_array))
+ KEEP (*(SORT(.fini_array.*)))
+ }
PROVIDE (__fini_array_end = .);
.ctors :
{
diff --git a/core/armelflib.x b/core/armelflib.x
index 0150e02..ec7abd5 100644
--- a/core/armelflib.x
+++ b/core/armelflib.x
@@ -59,10 +59,16 @@ SECTIONS
.preinit_array : { KEEP (*(.preinit_array)) }
PROVIDE (__preinit_array_end = .);
PROVIDE (__init_array_start = .);
- .init_array : { KEEP (*(.init_array)) }
+ .init_array : {
+ KEEP (*(SORT(.init_array.*)))
+ KEEP (*(.init_array))
+ }
PROVIDE (__init_array_end = .);
PROVIDE (__fini_array_start = .);
- .fini_array : { KEEP (*(.fini_array)) }
+ .fini_array : {
+ KEEP (*(.fini_array))
+ KEEP (*(SORT(.fini_array.*)))
+ }
PROVIDE (__fini_array_end = .);
.ctors :
{
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 242b53d..38c2c10 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -110,8 +110,10 @@ endif
# find files like MODULE_LICENSE_GPL_AND_AFL but exclude files like
# MODULE_LICENSE_LGPL.
#
-ifneq ($(call find-parent-file,$(LOCAL_PATH),MODULE_LICENSE*_GPL* MODULE_LICENSE*_MPL*),)
+gpl_license_file := $(call find-parent-file,$(LOCAL_PATH),MODULE_LICENSE*_GPL* MODULE_LICENSE*_MPL*)
+ifneq ($(gpl_license_file),)
LOCAL_MODULE_TAGS += gnu
+ ALL_GPL_MODULE_LICENSE_FILES := $(sort $(ALL_GPL_MODULE_LICENSE_FILES) $(gpl_license_file))
endif
#
@@ -381,7 +383,7 @@ endif # java_resource_file_groups
## PRIVATE java vars ######################################
-ifneq ($(strip $(all_java_sources)$(all_res_assets)),)
+ifneq ($(strip $(all_java_sources)$(all_res_assets))$(LOCAL_STATIC_JAVA_LIBRARIES),)
full_static_java_libs := \
$(foreach lib,$(LOCAL_STATIC_JAVA_LIBRARIES), \
@@ -587,6 +589,10 @@ ALL_MODULES.$(LOCAL_MODULE).EVENT_LOG_TAGS := \
$(ALL_MODULES.$(LOCAL_MODULE).EVENT_LOG_TAGS) $(event_log_tags)
ALL_MODULES.$(LOCAL_MODULE).INTERMEDIATE_SOURCE_DIR := \
$(ALL_MODULES.$(LOCAL_MODULE).INTERMEDIATE_SOURCE_DIR) $(LOCAL_INTERMEDIATE_SOURCE_DIR)
+ifdef LOCAL_MODULE_OWNER
+ALL_MODULES.$(LOCAL_MODULE).OWNER := \
+ $(strip $(ALL_MODULES.$(LOCAL_MODULE).OWNER) $(LOCAL_MODULE_OWNER))
+endif
INSTALLABLE_FILES.$(LOCAL_INSTALLED_MODULE).MODULE := $(LOCAL_MODULE)
diff --git a/core/binary.mk b/core/binary.mk
index e488200..852ac46 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -124,6 +124,21 @@ LOCAL_REQUIRED_MODULES += $(installed_shared_library_module_names)
include $(BUILD_SYSTEM)/base_rules.mk
#######################################
+ifeq ($(strip $(LOCAL_ADDRESS_SANITIZER)),true)
+ LOCAL_CLANG := true
+ LOCAL_CFLAGS += $(ADDRESS_SANITIZER_CONFIG_EXTRA_CFLAGS)
+ LOCAL_LDFLAGS += $(ADDRESS_SANITIZER_CONFIG_EXTRA_LDFLAGS)
+ LOCAL_SHARED_LIBRARIES += $(ADDRESS_SANITIZER_CONFIG_EXTRA_SHARED_LIBRARIES)
+ LOCAL_STATIC_LIBRARIES += $(ADDRESS_SANITIZER_CONFIG_EXTRA_STATIC_LIBRARIES)
+endif
+
+my_compiler_dependencies :=
+ifeq ($(strip $(LOCAL_CLANG)),true)
+ LOCAL_CFLAGS += $(CLANG_CONFIG_EXTRA_CFLAGS)
+ LOCAL_LDFLAGS += $(CLANG_CONFIG_EXTRA_LDFLAGS)
+ my_compiler_dependencies := $(CLANG) $(CLANG_CXX)
+endif
+
####################################################
## Add FDO flags if FDO is turned on and supported
####################################################
@@ -142,20 +157,29 @@ LOCAL_ASFLAGS += -D__ASSEMBLY__
###########################################################
## Define PRIVATE_ variables from global vars
###########################################################
+ifeq ($(strip $(LOCAL_CLANG)),true)
+my_target_global_cflags := $(TARGET_GLOBAL_CLANG_FLAGS)
+else
+my_target_global_cflags := $(TARGET_GLOBAL_CFLAGS)
+endif
+
ifdef LOCAL_NDK_VERSION
my_target_project_includes :=
-my_target_c_inclues := $(my_ndk_stl_include_path) $(my_ndk_version_root)/usr/include
+my_target_c_includes := $(my_ndk_stl_include_path) $(my_ndk_version_root)/usr/include
# TODO: more reliable way to remove platform stuff.
-my_target_global_cflags := $(filter-out -include -I system/%, $(TARGET_GLOBAL_CFLAGS))
+my_target_global_cflags := $(filter-out -include -I system/%, $(my_target_global_cflags))
my_target_global_cppflags := $(filter-out -include -I system/%, $(TARGET_GLOBAL_CPPFLAGS))
else
my_target_project_includes := $(TARGET_PROJECT_INCLUDES)
-my_target_c_inclues := $(TARGET_C_INCLUDES)
-my_target_global_cflags := $(TARGET_GLOBAL_CFLAGS)
+my_target_c_includes := $(TARGET_C_INCLUDES)
+my_target_global_cflags := $(my_target_global_cflags)
my_target_global_cppflags := $(TARGET_GLOBAL_CPPFLAGS)
+ifeq ($(strip $(LOCAL_CLANG)),true)
+ my_target_c_includes += $(CLANG_CONFIG_EXTRA_TARGET_C_INCLUDES)
+endif
endif
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_PROJECT_INCLUDES := $(my_target_project_includes)
-$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_C_INCLUDES := $(my_target_c_inclues)
+$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_C_INCLUDES := $(my_target_c_includes)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_GLOBAL_CFLAGS := $(my_target_global_cflags)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_GLOBAL_CPPFLAGS := $(my_target_global_cppflags)
@@ -163,15 +187,23 @@ $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_GLOBAL_CPPFLAGS := $(my_target_glo
## Define PRIVATE_ variables used by multiple module types
###########################################################
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_NO_DEFAULT_COMPILER_FLAGS := \
- $(strip $(LOCAL_NO_DEFAULT_COMPILER_FLAGS))
+ $(strip $(LOCAL_NO_DEFAULT_COMPILER_FLAGS))
ifeq ($(strip $(LOCAL_CC)),)
- LOCAL_CC := $($(my_prefix)CC)
+ ifeq ($(strip $(LOCAL_CLANG)),true)
+ LOCAL_CC := $(CLANG)
+ else
+ LOCAL_CC := $($(my_prefix)CC)
+ endif
endif
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CC := $(LOCAL_CC)
ifeq ($(strip $(LOCAL_CXX)),)
- LOCAL_CXX := $($(my_prefix)CXX)
+ ifeq ($(strip $(LOCAL_CLANG)),true)
+ LOCAL_CXX := $(CLANG_CXX)
+ else
+ LOCAL_CXX := $($(my_prefix)CXX)
+ endif
endif
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CXX := $(LOCAL_CXX)
@@ -247,7 +279,7 @@ ifneq ($(proto_sources),)
proto_sources_fullpath := $(addprefix $(LOCAL_PATH)/, $(proto_sources))
proto_generated_cc_sources_dir := $(intermediates)/proto
proto_generated_cc_sources := $(addprefix $(proto_generated_cc_sources_dir)/, \
- $(patsubst %.proto,%.pb.cc,$(proto_sources_fullpath)))
+ $(patsubst %.proto,%.pb.cc,$(proto_sources_fullpath)))
proto_generated_objects := $(patsubst %.cc,%.o, $(proto_generated_cc_sources))
$(proto_generated_cc_sources): PRIVATE_PROTO_INCLUDES := $(TOP)
@@ -261,7 +293,7 @@ $(proto_generated_headers): $(proto_generated_cc_sources_dir)/%.pb.h: $(proto_ge
$(proto_generated_cc_sources): PRIVATE_ARM_MODE := $(normal_objects_mode)
$(proto_generated_cc_sources): PRIVATE_ARM_CFLAGS := $(normal_objects_cflags)
-$(proto_generated_objects): $(proto_generated_cc_sources_dir)/%.o: $(proto_generated_cc_sources_dir)/%.cc
+$(proto_generated_objects): $(proto_generated_cc_sources_dir)/%.o: $(proto_generated_cc_sources_dir)/%.cc $(proto_generated_headers)
$(transform-$(PRIVATE_HOST)cpp-to-o)
-include $(proto_generated_objects:%.o=%.P)
@@ -281,14 +313,14 @@ endif
yacc_sources := $(filter %.y,$(LOCAL_SRC_FILES))
yacc_cpps := $(addprefix \
- $(intermediates)/,$(yacc_sources:.y=$(LOCAL_CPP_EXTENSION)))
+ $(intermediates)/,$(yacc_sources:.y=$(LOCAL_CPP_EXTENSION)))
yacc_headers := $(yacc_cpps:$(LOCAL_CPP_EXTENSION)=.h)
yacc_objects := $(yacc_cpps:$(LOCAL_CPP_EXTENSION)=.o)
ifneq ($(strip $(yacc_cpps)),)
$(yacc_cpps): $(intermediates)/%$(LOCAL_CPP_EXTENSION): \
- $(TOPDIR)$(LOCAL_PATH)/%.y \
- $(lex_cpps) $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(TOPDIR)$(LOCAL_PATH)/%.y \
+ $(lex_cpps) $(LOCAL_ADDITIONAL_DEPENDENCIES)
$(call transform-y-to-cpp,$(PRIVATE_CPP_EXTENSION))
$(yacc_headers): $(intermediates)/%.h: $(intermediates)/%$(LOCAL_CPP_EXTENSION)
@@ -304,20 +336,20 @@ endif
lex_sources := $(filter %.l,$(LOCAL_SRC_FILES))
lex_cpps := $(addprefix \
- $(intermediates)/,$(lex_sources:.l=$(LOCAL_CPP_EXTENSION)))
+ $(intermediates)/,$(lex_sources:.l=$(LOCAL_CPP_EXTENSION)))
lex_objects := $(lex_cpps:$(LOCAL_CPP_EXTENSION)=.o)
ifneq ($(strip $(lex_cpps)),)
$(lex_cpps): $(intermediates)/%$(LOCAL_CPP_EXTENSION): \
- $(TOPDIR)$(LOCAL_PATH)/%.l
+ $(TOPDIR)$(LOCAL_PATH)/%.l
$(transform-l-to-cpp)
$(lex_objects): PRIVATE_ARM_MODE := $(normal_objects_mode)
$(lex_objects): PRIVATE_ARM_CFLAGS := $(normal_objects_cflags)
$(lex_objects): $(intermediates)/%.o: \
- $(intermediates)/%$(LOCAL_CPP_EXTENSION) \
- $(LOCAL_ADDITIONAL_DEPENDENCIES) \
- $(yacc_headers)
+ $(intermediates)/%$(LOCAL_CPP_EXTENSION) \
+ $(LOCAL_ADDITIONAL_DEPENDENCIES) \
+ $(yacc_headers)
$(transform-$(PRIVATE_HOST)cpp-to-o)
endif
@@ -342,8 +374,9 @@ cpp_objects := $(cpp_arm_objects) $(cpp_normal_objects)
ifneq ($(strip $(cpp_objects)),)
$(cpp_objects): $(intermediates)/%.o: \
- $(TOPDIR)$(LOCAL_PATH)/%$(LOCAL_CPP_EXTENSION) \
- $(yacc_cpps) $(proto_generated_headers) $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(TOPDIR)$(LOCAL_PATH)/%$(LOCAL_CPP_EXTENSION) \
+ $(yacc_cpps) $(proto_generated_headers) $(my_compiler_dependencies) \
+ $(LOCAL_ADDITIONAL_DEPENDENCIES)
$(transform-$(PRIVATE_HOST)cpp-to-o)
-include $(cpp_objects:%.o=%.P)
endif
@@ -360,7 +393,10 @@ ifneq ($(strip $(gen_cpp_objects)),)
# TODO: support compiling certain generated files as arm.
$(gen_cpp_objects): PRIVATE_ARM_MODE := $(normal_objects_mode)
$(gen_cpp_objects): PRIVATE_ARM_CFLAGS := $(normal_objects_cflags)
-$(gen_cpp_objects): $(intermediates)/%.o: $(intermediates)/%$(LOCAL_CPP_EXTENSION) $(yacc_cpps) $(proto_generated_headers) $(LOCAL_ADDITIONAL_DEPENDENCIES)
+$(gen_cpp_objects): $(intermediates)/%.o: \
+ $(intermediates)/%$(LOCAL_CPP_EXTENSION) $(yacc_cpps) \
+ $(proto_generated_headers) $(my_compiler_dependencies) \
+ $(LOCAL_ADDITIONAL_DEPENDENCIES)
$(transform-$(PRIVATE_HOST)cpp-to-o)
-include $(gen_cpp_objects:%.o=%.P)
endif
@@ -373,7 +409,8 @@ gen_S_sources := $(filter %.S,$(LOCAL_GENERATED_SOURCES))
gen_S_objects := $(gen_S_sources:%.S=%.o)
ifneq ($(strip $(gen_S_sources)),)
-$(gen_S_objects): $(intermediates)/%.o: $(intermediates)/%.S $(LOCAL_ADDITIONAL_DEPENDENCIES)
+$(gen_S_objects): $(intermediates)/%.o: $(intermediates)/%.S \
+ $(my_compiler_dependencies) $(LOCAL_ADDITIONAL_DEPENDENCIES)
$(transform-$(PRIVATE_HOST)s-to-o)
-include $(gen_S_objects:%.o=%.P)
endif
@@ -382,7 +419,8 @@ gen_s_sources := $(filter %.s,$(LOCAL_GENERATED_SOURCES))
gen_s_objects := $(gen_s_sources:%.s=%.o)
ifneq ($(strip $(gen_s_objects)),)
-$(gen_s_objects): $(intermediates)/%.o: $(intermediates)/%.s $(LOCAL_ADDITIONAL_DEPENDENCIES)
+$(gen_s_objects): $(intermediates)/%.o: $(intermediates)/%.s \
+ $(my_compiler_dependencies) $(LOCAL_ADDITIONAL_DEPENDENCIES)
$(transform-$(PRIVATE_HOST)s-to-o-no-deps)
-include $(gen_s_objects:%.o=%.P)
endif
@@ -407,7 +445,8 @@ $(c_normal_objects): PRIVATE_ARM_CFLAGS := $(normal_objects_cflags)
c_objects := $(c_arm_objects) $(c_normal_objects)
ifneq ($(strip $(c_objects)),)
-$(c_objects): $(intermediates)/%.o: $(TOPDIR)$(LOCAL_PATH)/%.c $(yacc_cpps) $(proto_generated_headers) $(LOCAL_ADDITIONAL_DEPENDENCIES)
+$(c_objects): $(intermediates)/%.o: $(TOPDIR)$(LOCAL_PATH)/%.c $(yacc_cpps) $(proto_generated_headers) \
+ $(my_compiler_dependencies) $(LOCAL_ADDITIONAL_DEPENDENCIES)
$(transform-$(PRIVATE_HOST)c-to-o)
-include $(c_objects:%.o=%.P)
endif
@@ -424,7 +463,8 @@ ifneq ($(strip $(gen_c_objects)),)
# TODO: support compiling certain generated files as arm.
$(gen_c_objects): PRIVATE_ARM_MODE := $(normal_objects_mode)
$(gen_c_objects): PRIVATE_ARM_CFLAGS := $(normal_objects_cflags)
-$(gen_c_objects): $(intermediates)/%.o: $(intermediates)/%.c $(yacc_cpps) $(proto_generated_headers) $(LOCAL_ADDITIONAL_DEPENDENCIES)
+$(gen_c_objects): $(intermediates)/%.o: $(intermediates)/%.c $(yacc_cpps) $(proto_generated_headers) \
+ $(my_compiler_dependencies) $(LOCAL_ADDITIONAL_DEPENDENCIES)
$(transform-$(PRIVATE_HOST)c-to-o)
-include $(gen_c_objects:%.o=%.P)
endif
@@ -437,7 +477,8 @@ objc_sources := $(filter %.m,$(LOCAL_SRC_FILES))
objc_objects := $(addprefix $(intermediates)/,$(objc_sources:.m=.o))
ifneq ($(strip $(objc_objects)),)
-$(objc_objects): $(intermediates)/%.o: $(TOPDIR)$(LOCAL_PATH)/%.m $(yacc_cpps) $(proto_generated_headers) $(LOCAL_ADDITIONAL_DEPENDENCIES)
+$(objc_objects): $(intermediates)/%.o: $(TOPDIR)$(LOCAL_PATH)/%.m $(yacc_cpps) $(proto_generated_headers) \
+ $(my_compiler_dependencies) $(LOCAL_ADDITIONAL_DEPENDENCIES)
$(transform-$(PRIVATE_HOST)m-to-o)
-include $(objc_objects:%.o=%.P)
endif
@@ -450,7 +491,8 @@ asm_sources_S := $(filter %.S,$(LOCAL_SRC_FILES))
asm_objects_S := $(addprefix $(intermediates)/,$(asm_sources_S:.S=.o))
ifneq ($(strip $(asm_objects_S)),)
-$(asm_objects_S): $(intermediates)/%.o: $(TOPDIR)$(LOCAL_PATH)/%.S $(LOCAL_ADDITIONAL_DEPENDENCIES)
+$(asm_objects_S): $(intermediates)/%.o: $(TOPDIR)$(LOCAL_PATH)/%.S \
+ $(my_compiler_dependencies) $(LOCAL_ADDITIONAL_DEPENDENCIES)
$(transform-$(PRIVATE_HOST)s-to-o)
-include $(asm_objects_S:%.o=%.P)
endif
@@ -459,7 +501,8 @@ asm_sources_s := $(filter %.s,$(LOCAL_SRC_FILES))
asm_objects_s := $(addprefix $(intermediates)/,$(asm_sources_s:.s=.o))
ifneq ($(strip $(asm_objects_s)),)
-$(asm_objects_s): $(intermediates)/%.o: $(TOPDIR)$(LOCAL_PATH)/%.s $(LOCAL_ADDITIONAL_DEPENDENCIES)
+$(asm_objects_s): $(intermediates)/%.o: $(TOPDIR)$(LOCAL_PATH)/%.s \
+ $(my_compiler_dependencies) $(LOCAL_ADDITIONAL_DEPENDENCIES)
$(transform-$(PRIVATE_HOST)s-to-o-no-deps)
-include $(asm_objects_s:%.o=%.P)
endif
@@ -474,19 +517,19 @@ asm_objects := $(asm_objects_S) $(asm_objects_s)
# some rules depend on asm_objects being first. If your code depends on
# being first, it's reasonable to require it to be assembly
all_objects := \
- $(asm_objects) \
- $(cpp_objects) \
- $(gen_cpp_objects) \
- $(gen_asm_objects) \
- $(c_objects) \
- $(gen_c_objects) \
- $(objc_objects) \
- $(yacc_objects) \
- $(lex_objects) \
- $(proto_generated_objects) \
- $(addprefix $(TOPDIR)$(LOCAL_PATH)/,$(LOCAL_PREBUILT_OBJ_FILES))
-
-LOCAL_C_INCLUDES += $(TOPDIR)$(LOCAL_PATH) $(intermediates) $(base_intermediates)
+ $(asm_objects) \
+ $(cpp_objects) \
+ $(gen_cpp_objects) \
+ $(gen_asm_objects) \
+ $(c_objects) \
+ $(gen_c_objects) \
+ $(objc_objects) \
+ $(yacc_objects) \
+ $(lex_objects) \
+ $(proto_generated_objects) \
+ $(addprefix $(TOPDIR)$(LOCAL_PATH)/,$(LOCAL_PREBUILT_OBJ_FILES))
+
+LOCAL_C_INCLUDES += $(TOPDIR)$(LOCAL_PATH) $(intermediates)
ifndef LOCAL_NDK_VERSION
LOCAL_C_INCLUDES += $(JNI_H_INCLUDE)
@@ -571,7 +614,7 @@ built_whole_libraries := \
# We don't care about installed static libraries, since the
# libraries have already been linked into the module at that point.
# We do, however, care about the NOTICE files for any static
-# libraries that we use. (see notice_files.make)
+# libraries that we use. (see notice_files.mk)
installed_static_library_notice_file_targets := \
$(foreach lib,$(LOCAL_STATIC_LIBRARIES) $(LOCAL_WHOLE_STATIC_LIBRARIES), \
diff --git a/core/build_id.mk b/core/build_id.mk
index 70bd235..40bb35d 100644
--- a/core/build_id.mk
+++ b/core/build_id.mk
@@ -23,7 +23,7 @@
# (like "TC1-RC5"). It must be a single word, and is
# capitalized by convention.
#
-BUILD_ID := MR1
+BUILD_ID := MASTER
# DISPLAY_BUILD_NUMBER should only be set for development branches,
# If set, the BUILD_NUMBER (cl) is appended to the BUILD_ID for
diff --git a/core/clear_vars.mk b/core/clear_vars.mk
index c6fd06b..6131be7 100644
--- a/core/clear_vars.mk
+++ b/core/clear_vars.mk
@@ -58,7 +58,6 @@ LOCAL_INTERMEDIATE_SOURCES:=
LOCAL_INTERMEDIATE_SOURCE_DIR:=
LOCAL_JAVACFLAGS:=
LOCAL_JAVA_LIBRARIES:=
-LOCAL_JAVA_LAYERS_FILE:=
LOCAL_NO_STANDARD_LIBRARIES:=
LOCAL_CLASSPATH:=
LOCAL_DROIDDOC_USE_STANDARD_DOCLET:=
@@ -108,6 +107,7 @@ LOCAL_MANIFEST_FILE:=
LOCAL_RENDERSCRIPT_INCLUDES:=
LOCAL_RENDERSCRIPT_INCLUDES_OVERRIDE:=
LOCAL_RENDERSCRIPT_CC:=
+LOCAL_RENDERSCRIPT_FLAGS:=
LOCAL_RENDERSCRIPT_TARGET_API:=
LOCAL_BUILD_HOST_DEX:=
LOCAL_DEX_PREOPT:= # '',true,false,nostripping
@@ -115,7 +115,11 @@ LOCAL_PROTOC_OPTIMIZE_TYPE:= # lite(default),micro,full
LOCAL_PROTOC_FLAGS:=
LOCAL_NO_CRT:=
LOCAL_PROPRIETARY_MODULE:=
+LOCAL_MODULE_OWNER:=
LOCAL_CTS_TEST_PACKAGE:=
+LOCAL_CTS_TEST_RUNNER:=
+LOCAL_CLANG:=
+LOCAL_ADDRESS_SANITIZER:=
# Trim MAKEFILE_LIST so that $(call my-dir) doesn't need to
# iterate over thousands of entries every time.
diff --git a/core/combo/HOST_darwin-x86.mk b/core/combo/HOST_darwin-x86.mk
index 544a29e..198c53f 100644
--- a/core/combo/HOST_darwin-x86.mk
+++ b/core/combo/HOST_darwin-x86.mk
@@ -17,11 +17,17 @@
# Configuration for Darwin (Mac OS X) on x86.
# Included by combo/select.mk
-# We build everything in 32-bit, because some host tools are
-# 32-bit-only anyway (emulator, acc), and because it gives us
+ifneq ($(strip $(BUILD_HOST_64bit)),)
+# By default we build everything in 32-bit, because it gives us
# more consistency between the host tools and the target.
+# BUILD_HOST_64bit=1 overrides it for tool like emulator
+# which can benefit from 64-bit host arch.
+HOST_GLOBAL_CFLAGS += -m64
+HOST_GLOBAL_LDFLAGS += -m64
+else
HOST_GLOBAL_CFLAGS += -m32
HOST_GLOBAL_LDFLAGS += -m32
+endif # BUILD_HOST_64bit
# Use the Mac OSX SDK 10.5 if the build host is 10.6
build_mac_version := $(shell sw_vers -productVersion)
@@ -53,32 +59,58 @@ HOST_JNILIB_SUFFIX := .jnilib
HOST_GLOBAL_CFLAGS += \
-include $(call select-android-config-h,darwin-x86)
-HOST_RUN_RANLIB_AFTER_COPYING := true
+ifneq ($(filter 10.7.%, $(build_mac_version)),)
+ HOST_RUN_RANLIB_AFTER_COPYING := false
+else
+ HOST_RUN_RANLIB_AFTER_COPYING := true
+ PRE_LION_DYNAMIC_LINKER_OPTIONS := -Wl,-dynamic
+endif
HOST_GLOBAL_ARFLAGS := cqs
HOST_CUSTOM_LD_COMMAND := true
+# Workaround for lack of "-Wl,--whole-archive" in MacOS's linker.
+define _darwin-extract-and-include-single-whole-static-lib
+@echo "preparing StaticLib: $(PRIVATE_MODULE) [including $(1)]"
+$(hide) ldir=$(PRIVATE_INTERMEDIATES_DIR)/WHOLE/$(basename $(notdir $(1)))_objs;\
+ mkdir -p $$ldir; \
+ for f in `$(HOST_AR) t $(1)`; do \
+ $(HOST_AR) p $(1) $$f > $$ldir/$$f; \
+ done ;
+
+endef
+
+define darwin-extract-and-include-whole-static-libs
+$(if $(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES), $(hide) rm -rf $(PRIVATE_INTERMEDIATES_DIR)/WHOLE)
+$(foreach lib,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES), \
+ $(call _darwin-extract-and-include-single-whole-static-lib, $(lib)))
+endef
+
define transform-host-o-to-shared-lib-inner
+$(call darwin-extract-and-include-whole-static-libs)
$(hide) $(PRIVATE_CXX) \
-dynamiclib -single_module -read_only_relocs suppress \
$(HOST_GLOBAL_LD_DIRS) \
$(HOST_GLOBAL_LDFLAGS) \
$(PRIVATE_ALL_OBJECTS) \
+ $(if $(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES), `find $(PRIVATE_INTERMEDIATES_DIR)/WHOLE -name '*.o' 2>/dev/null`) \
$(call normalize-host-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
- $(call normalize-host-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--start-group) \
$(call normalize-host-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
$(PRIVATE_LDLIBS) \
-o $@ \
+ -install_name @rpath/$(notdir $@) \
+ -Wl,-rpath,@loader_path/../lib \
$(PRIVATE_LDFLAGS) \
$(HOST_LIBGCC)
endef
define transform-host-o-to-executable-inner
$(hide) $(PRIVATE_CXX) \
+ -Wl,-rpath,@loader_path/../lib \
-o $@ \
- -Wl,-dynamic -headerpad_max_install_names \
+ $(PRE_LION_DYNAMIC_LINKER_OPTIONS) -headerpad_max_install_names \
$(HOST_GLOBAL_LD_DIRS) \
$(HOST_GLOBAL_LDFLAGS) \
$(call normalize-host-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
diff --git a/core/combo/HOST_linux-x86.mk b/core/combo/HOST_linux-x86.mk
index 5ae4972..6cee6ea 100644
--- a/core/combo/HOST_linux-x86.mk
+++ b/core/combo/HOST_linux-x86.mk
@@ -33,26 +33,32 @@ endef
# LOCAL_CC and LOCAL_CXX to override this.
#
ifeq ($(TARGET_PRODUCT),sdk)
-HOST_SDK_TOOLCHAIN_PREFIX := prebuilt/linux-x86/toolchain/i686-linux-glibc2.7-4.4.3/bin/i686-linux
+HOST_SDK_TOOLCHAIN_PREFIX := prebuilts/tools/gcc-sdk
# Don't do anything if the toolchain is not there
-ifneq (,$(strip $(wildcard $(HOST_SDK_TOOLCHAIN_PREFIX)-gcc)))
-HOST_CC := $(HOST_SDK_TOOLCHAIN_PREFIX)-gcc
-HOST_CXX := $(HOST_SDK_TOOLCHAIN_PREFIX)-g++
-HOST_AR := $(HOST_SDK_TOOLCHAIN_PREFIX)-ar
-endif # $(HOST_SDK_TOOLCHAIN_PREFIX)-gcc exists
+ifneq (,$(strip $(wildcard $(HOST_SDK_TOOLCHAIN_PREFIX)/gcc)))
+HOST_CC := $(HOST_SDK_TOOLCHAIN_PREFIX)/gcc
+HOST_CXX := $(HOST_SDK_TOOLCHAIN_PREFIX)/g++
+HOST_AR := $(HOST_SDK_TOOLCHAIN_PREFIX)/ar
+endif # $(HOST_SDK_TOOLCHAIN_PREFIX)/gcc exists
endif # TARGET_PRODUCT == sdk
-# We build everything in 32-bit, because some host tools are
-# 32-bit-only anyway (emulator, acc), and because it gives us
+ifneq ($(strip $(BUILD_HOST_64bit)),)
+# By default we build everything in 32-bit, because it gives us
# more consistency between the host tools and the target.
+# BUILD_HOST_64bit=1 overrides it for tool like emulator
+# which can benefit from 64-bit host arch.
+HOST_GLOBAL_CFLAGS += -m64
+HOST_GLOBAL_LDFLAGS += -m64
+else
HOST_GLOBAL_CFLAGS += -m32
HOST_GLOBAL_LDFLAGS += -m32
+endif # BUILD_HOST_64bit
HOST_GLOBAL_CFLAGS += -fPIC
HOST_GLOBAL_CFLAGS += \
-include $(call select-android-config-h,linux-x86)
# Disable new longjmp in glibc 2.11 and later. See bug 2967937.
-HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
+HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
HOST_NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined
diff --git a/core/combo/HOST_windows-x86.mk b/core/combo/HOST_windows-x86.mk
index 9870998..fe4bd66 100644
--- a/core/combo/HOST_windows-x86.mk
+++ b/core/combo/HOST_windows-x86.mk
@@ -26,13 +26,19 @@ TOOLS_EXE_SUFFIX := .exe
ifneq ($(findstring Linux,$(UNAME)),)
ifneq ($(strip $(USE_MINGW)),)
HOST_ACP_UNAVAILABLE := true
-TOOLS_PREFIX := /usr/bin/i586-mingw32msvc-
TOOLS_EXE_SUFFIX :=
HOST_GLOBAL_CFLAGS += -DUSE_MINGW
+ifneq ($(strip $(BUILD_HOST_64bit)),)
+TOOLS_PREFIX := /usr/bin/amd64-mingw32msvc-
+HOST_C_INCLUDES += /usr/lib/gcc/amd64-mingw32msvc/4.4.2/include
+HOST_GLOBAL_LD_DIRS += -L/usr/amd64-mingw32msvc/lib
+else
+TOOLS_PREFIX := /usr/bin/i586-mingw32msvc-
HOST_C_INCLUDES += /usr/lib/gcc/i586-mingw32msvc/3.4.4/include
HOST_GLOBAL_LD_DIRS += -L/usr/i586-mingw32msvc/lib
-endif
-endif
+endif # BUILD_HOST_64bit
+endif # USE_MINGW
+endif # Linux
HOST_CC := $(TOOLS_PREFIX)gcc$(TOOLS_EXE_SUFFIX)
HOST_CXX := $(TOOLS_PREFIX)g++$(TOOLS_EXE_SUFFIX)
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk
index 8c89143..ca12ba2 100644
--- a/core/combo/TARGET_linux-arm.mk
+++ b/core/combo/TARGET_linux-arm.mk
@@ -43,8 +43,8 @@ include $(TARGET_ARCH_SPECIFIC_MAKEFILE)
# You can set TARGET_TOOLS_PREFIX to get gcc from somewhere else
ifeq ($(strip $(TARGET_TOOLS_PREFIX)),)
-TARGET_TOOLS_PREFIX := \
- prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-
+TARGET_TOOLCHAIN_ROOT := prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-4.6
+TARGET_TOOLS_PREFIX := $(TARGET_TOOLCHAIN_ROOT)/bin/arm-linux-androideabi-
endif
# Only define these if there's actually a gcc in there.
@@ -102,7 +102,7 @@ android_config_h := $(call select-android-config-h,linux-arm)
arch_include_dir := $(dir $(android_config_h))
TARGET_GLOBAL_CFLAGS += \
- -msoft-float -fpic \
+ -msoft-float -fpic -fPIE \
-ffunction-sections \
-fdata-sections \
-funwind-tables \
@@ -114,11 +114,13 @@ TARGET_GLOBAL_CFLAGS += \
-include $(android_config_h) \
-I $(arch_include_dir)
-# This warning causes dalvik not to build with gcc 4.6 and -Werror.
+# This warning causes dalvik not to build with gcc 4.6.x and -Werror.
# We cannot turn it off blindly since the option is not available
-# in gcc-4.4.x
-ifneq ($(filter 4.6.0%, $(shell $(TARGET_CC) --version)),)
-TARGET_GLOBAL_CFLAGS += -Wno-unused-but-set-variable
+# in gcc-4.4.x. We also want to disable sincos optimization globally
+# by turning off the builtin sin function.
+ifneq ($(filter 4.6.%, $(shell $(TARGET_CC) --version)),)
+TARGET_GLOBAL_CFLAGS += -Wno-unused-but-set-variable -fno-builtin-sin \
+ -fno-strict-volatile-bitfields
endif
# This is to avoid the dreaded warning compiler message:
@@ -266,7 +268,7 @@ $(hide) $(PRIVATE_CXX) \
endef
define transform-o-to-executable-inner
-$(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -Wl,-T,$(BUILD_SYSTEM)/armelf.x \
+$(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -fPIE -pie \
-Wl,-dynamic-linker,/system/bin/linker \
-Wl,--gc-sections \
-Wl,-z,nocopyreloc \
@@ -287,7 +289,7 @@ $(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -Wl,-T,$(BUILD_SYSTEM)/armelf.x \
endef
define transform-o-to-static-executable-inner
-$(hide) $(PRIVATE_CXX) -nostdlib -Bstatic -Wl,-T,$(BUILD_SYSTEM)/armelf.x \
+$(hide) $(PRIVATE_CXX) -nostdlib -Bstatic \
-Wl,--gc-sections \
-o $@ \
$(TARGET_GLOBAL_LD_DIRS) \
diff --git a/core/combo/TARGET_linux-sh.mk b/core/combo/TARGET_linux-sh.mk
index b8e00dd..88c6215 100644
--- a/core/combo/TARGET_linux-sh.mk
+++ b/core/combo/TARGET_linux-sh.mk
@@ -19,8 +19,8 @@
# You can set TARGET_TOOLS_PREFIX to get gcc from somewhere else
ifeq ($(strip $(TARGET_TOOLS_PREFIX)),)
-TARGET_TOOLS_PREFIX := \
- prebuilt/$(HOST_PREBUILT_TAG)/toolchain/sh-4.3.3/bin/sh-linux-gnu-
+TARGET_TOOLCHAIN_ROOT := prebuilt/$(HOST_PREBUILT_TAG)/toolchain/sh-4.3.3
+TARGET_TOOLS_PREFIX := $(TARGET_TOOLCHAIN_ROOT)/bin/sh-linux-gnu-
endif
TARGET_CC := $(TARGET_TOOLS_PREFIX)gcc$(HOST_EXECUTABLE_SUFFIX)
diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk
index 0fb6edc..9e1d4bd 100644
--- a/core/combo/TARGET_linux-x86.mk
+++ b/core/combo/TARGET_linux-x86.mk
@@ -22,10 +22,22 @@ ifeq ($(strip $(TARGET_ARCH_VARIANT)),)
TARGET_ARCH_VARIANT := x86
endif
+# Include the arch-variant-specific configuration file.
+# Its role is to define various ARCH_X86_HAVE_XXX feature macros,
+# plus initial values for TARGET_GLOBAL_CFLAGS
+#
+TARGET_ARCH_SPECIFIC_MAKEFILE := $(BUILD_COMBOS)/arch/$(TARGET_ARCH)/$(TARGET_ARCH_VARIANT).mk
+ifeq ($(strip $(wildcard $(TARGET_ARCH_SPECIFIC_MAKEFILE))),)
+$(error Unknown $(TARGET_ARCH) architecture version: $(TARGET_ARCH_VARIANT))
+endif
+
+include $(TARGET_ARCH_SPECIFIC_MAKEFILE)
+
+
# You can set TARGET_TOOLS_PREFIX to get gcc from somewhere else
ifeq ($(strip $(TARGET_TOOLS_PREFIX)),)
-TARGET_TOOLS_PREFIX := \
- prebuilt/$(HOST_PREBUILT_TAG)/toolchain/i686-android-linux-4.4.3/bin/i686-android-linux-
+TARGET_TOOLCHAIN_ROOT := prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-android-linux-4.4.3
+TARGET_TOOLS_PREFIX := $(TARGET_TOOLCHAIN_ROOT)/bin/i686-android-linux-
endif
TARGET_CC := $(TARGET_TOOLS_PREFIX)gcc$(HOST_EXECUTABLE_SUFFIX)
@@ -73,7 +85,7 @@ TARGET_GLOBAL_CFLAGS += \
-Wa,--noexecstack \
-Werror=format-security \
-Wstrict-aliasing=2 \
- -fPIC \
+ -fPIC -fPIE \
-ffunction-sections \
-finline-functions \
-finline-limit=300 \
@@ -84,27 +96,48 @@ TARGET_GLOBAL_CFLAGS += \
-funwind-tables \
-include $(call select-android-config-h,target_linux-x86)
-# Needs to be fixed later
-#TARGET_GLOBAL_CFLAGS += \
-# -fstack-protector
-
-# Needs to be added for RELEASE
-#TARGET_GLOBAL_CFLAGS += \
-# -DNDEBUG
-
+# XXX: Not sure this is still needed. Must check with our toolchains.
TARGET_GLOBAL_CPPFLAGS += \
-fno-use-cxa-atexit
-ifeq ($(TARGET_ARCH_VARIANT),x86-atom)
- TARGET_GLOBAL_CFLAGS += -march=atom -mstackrealign -DUSE_SSSE3 -DUSE_SSE2 -mfpmath=sse
-else
- TARGET_GLOBAL_CFLAGS += -march=i686
+# XXX: Our toolchain is normally configured to always set these flags by default
+# however, there have been reports that this is sometimes not the case. So make
+# them explicit here unless we have the time to carefully check it
+#
+TARGET_GLOBAL_CFLAGS += -mstackrealign -msse3 -mfpmath=sse
+
+# XXX: These flags should not be defined here anymore. Instead, the Android.mk
+# of the modules that depend on these features should instead check the
+# corresponding macros (e.g. ARCH_X86_HAVE_SSE2 and ARCH_X86_HAVE_SSSE3)
+# Keep them here until this is all cleared up.
+#
+ifeq ($(ARCH_X86_HAVE_SSE2),true)
+TARGET_GLOBAL_CFLAGS += -DUSE_SSE2
endif
+ifeq ($(ARCH_X86_HAVE_SSSE3),true) # yes, really SSSE3, not SSE3!
+TARGET_GLOBAL_CFLAGS += -DUSE_SSSE3
+endif
+
+# XXX: This flag is probably redundant. I believe our toolchain always sets
+# it by default. Consider for removal.
+#
TARGET_GLOBAL_CFLAGS += -mbionic
+
+# XXX: This flag is probably redundant. The macro should be defined by our
+# toolchain binaries automatically (as a compiler built-in).
+# Check with: $BINPREFIX-gcc -dM -E < /dev/null
+#
+# Consider for removal.
+#
TARGET_GLOBAL_CFLAGS += -D__ANDROID__
+# XXX: This flag is probably redundant since our toolchain binaries already
+# generate 32-bit machine code. It probably dates back to the old days
+# where we were using the host toolchain on Linux to build the platform
+# images. Consider it for removal.
TARGET_GLOBAL_LDFLAGS += -m32
+
TARGET_GLOBAL_LDFLAGS += -Wl,-z,noexecstack
TARGET_GLOBAL_LDFLAGS += -Wl,--gc-sections
@@ -158,6 +191,7 @@ $(hide) $(PRIVATE_CXX) \
-nostdlib -Bdynamic \
-Wl,-dynamic-linker,/system/bin/linker \
-Wl,-z,nocopyreloc \
+ -fPIE -pie \
-o $@ \
$(TARGET_GLOBAL_LD_DIRS) \
-Wl,-rpath-link=$(TARGET_OUT_INTERMEDIATE_LIBRARIES) \
@@ -187,3 +221,21 @@ $(hide) $(PRIVATE_CXX) \
-Wl,--end-group \
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(TARGET_CRTEND_O))
endef
+
+# Special check for x86 NDK ABI compatibility.
+# The TARGET_CPU_ABI variable should be defined in BoardConfig.mk to 'x86'
+# *only* if the platform image is compatible with the NDK x86 ABI.
+#
+# We perform a small check here to ensure that nothing bad can happen.
+#
+ifeq ($(TARGET_CPU_ABI),x86)
+ ifneq (true-true-true-true,$(ARCH_X86_HAVE_MMX)-$(ARCH_X86_HAVE_SSE)-$(ARCH_X86_HAVE_SSE2)-$(ARCH_X86_HAVE_SSE3))
+ $(info ERROR: Your x86 platform image is not compatible with the NDK x86 ABI)
+ $(info As such, you should *not* define TARGET_CPU_ABI to 'x86' in your BoardConfig.mk)
+ $(info to ensure that your device will not be mistakenly listed as compatible by
+ $(info the Android Market. Also, it is likely that the image will fail the CTS tests)
+ $(info Please undefine TARGET_CPU_ABI in your BoardConfig.mk, or select the value 'none')
+ $(info The corresponding image will still be able to run Dalvik-based Android applications)
+ $(error Aborting build! Please fix your BoardConfig.mk)
+ endif
+endif
diff --git a/core/combo/arch/arm/armv7-a-neon.mk b/core/combo/arch/arm/armv7-a-neon.mk
index 7b5b8ed..32273ff 100644
--- a/core/combo/arch/arm/armv7-a-neon.mk
+++ b/core/combo/arch/arm/armv7-a-neon.mk
@@ -8,6 +8,7 @@ ARCH_ARM_HAVE_HALFWORD_MULTIPLY := true
ARCH_ARM_HAVE_CLZ := true
ARCH_ARM_HAVE_FFS := true
ARCH_ARM_HAVE_ARMV7A := true
+ARCH_ARM_HAVE_TLS_REGISTER := true
ARCH_ARM_HAVE_VFP := true
ARCH_ARM_HAVE_VFP_D32 := true
ARCH_ARM_HAVE_NEON := true
diff --git a/core/combo/arch/arm/armv7-a.mk b/core/combo/arch/arm/armv7-a.mk
index 0ca3ec6..220f7ec 100644
--- a/core/combo/arch/arm/armv7-a.mk
+++ b/core/combo/arch/arm/armv7-a.mk
@@ -8,6 +8,7 @@ ARCH_ARM_HAVE_HALFWORD_MULTIPLY := true
ARCH_ARM_HAVE_CLZ := true
ARCH_ARM_HAVE_FFS := true
ARCH_ARM_HAVE_ARMV7A := true
+ARCH_ARM_HAVE_TLS_REGISTER := true
ARCH_ARM_HAVE_VFP := true
# Note: Hard coding the 'tune' value here is probably not ideal,
diff --git a/core/combo/arch/x86/x86-atom.mk b/core/combo/arch/x86/x86-atom.mk
new file mode 100644
index 0000000..85998e7
--- /dev/null
+++ b/core/combo/arch/x86/x86-atom.mk
@@ -0,0 +1,18 @@
+# This file contains feature macro definitions specific to the
+# 'x86-atom' arch variant. This is an extension of the 'x86' base variant
+# that adds Atom-specific features.
+#
+# See build/core/combo/arch/x86/x86.mk for differences.
+#
+ARCH_X86_HAVE_MMX := true
+ARCH_X86_HAVE_SSE := true
+ARCH_X86_HAVE_SSE2 := true
+ARCH_X86_HAVE_SSE3 := true
+
+ARCH_X86_HAVE_SSSE3 := true
+ARCH_X86_HAVE_MOVBE := true
+ARCH_X86_HAVE_POPCNT := false # popcnt is not supported by current Atom CPUs
+
+# This flag is used to enabled Atom-specific optimizations with our toolchain
+#
+TARGET_GLOBAL_CFLAGS += -march=atom
diff --git a/core/combo/arch/x86/x86.mk b/core/combo/arch/x86/x86.mk
new file mode 100644
index 0000000..476da45
--- /dev/null
+++ b/core/combo/arch/x86/x86.mk
@@ -0,0 +1,35 @@
+# This file contains feature macro definitions specific to the
+# base 'x86' platform ABI. This one must *strictly* match the NDK x86 ABI
+# which mandates specific CPU extensions to be available.
+#
+# It is also used to build full_x86-eng / sdk_x86-eng platform images that
+# are run in the emulator under KVM emulation (i.e. running directly on
+# the host development machine's CPU).
+#
+
+# If your target device doesn't support the four following features, then
+# it cannot be compatible with the NDK x86 ABI. You should define a new
+# target arch variant (e.g. "x86-mydevice") and a corresponding file
+# under build/core/combo/arch/x86/
+#
+ARCH_X86_HAVE_MMX := true
+ARCH_X86_HAVE_SSE := true
+ARCH_X86_HAVE_SSE2 := true
+ARCH_X86_HAVE_SSE3 := true
+
+# These features are optional and shall not be included in the base platform
+# Otherwise, they sdk_x86-eng system images might fail to run on some
+# developer machines.
+#
+
+ARCH_X86_HAVE_SSSE3 := false
+ARCH_X86_HAVE_MOVBE := false
+ARCH_X86_HAVE_POPCNT := false
+
+
+# XXX: This flag is probably redundant, because it should be set by default
+# by our toolchain binaries. However, there have been reports that this may
+# not always work as intended, so keep it unless we have the time to check
+# everything properly.
+
+TARGET_GLOBAL_CFLAGS += -march=i686
diff --git a/core/combo/select.mk b/core/combo/select.mk
index cdeb68a..803cfc0 100644
--- a/core/combo/select.mk
+++ b/core/combo/select.mk
@@ -66,7 +66,7 @@ ifneq ($(USE_CCACHE),)
ifeq ($(HOST_OS)-$(BUILD_OS),windows-linux)
CCACHE_HOST_TAG := linux-$(BUILD_ARCH)
endif
- ccache := prebuilt/$(CCACHE_HOST_TAG)/ccache/ccache
+ ccache := prebuilts/misc/$(CCACHE_HOST_TAG)/ccache/ccache
# Check that the executable is here.
ccache := $(strip $(wildcard $(ccache)))
ifdef ccache
diff --git a/core/config.mk b/core/config.mk
index d486ed3..dabdfde 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -29,9 +29,11 @@ SRC_HEADERS := \
$(TOPDIR)hardware/libhardware_legacy/include \
$(TOPDIR)hardware/ril/include \
$(TOPDIR)dalvik/libnativehelper/include \
+ $(TOPDIR)frameworks/native/include \
+ $(TOPDIR)frameworks/native/opengl/include \
+ $(TOPDIR)frameworks/av/include \
$(TOPDIR)frameworks/base/include \
$(TOPDIR)frameworks/base/opengl/include \
- $(TOPDIR)frameworks/base/native/include \
$(TOPDIR)external/skia/include
SRC_HOST_HEADERS:=$(TOPDIR)tools/include
SRC_LIBRARIES:= $(TOPDIR)libs
@@ -73,6 +75,8 @@ BUILD_COPY_HEADERS := $(BUILD_SYSTEM)/copy_headers.mk
BUILD_NATIVE_TEST := $(BUILD_SYSTEM)/native_test.mk
BUILD_HOST_NATIVE_TEST := $(BUILD_SYSTEM)/host_native_test.mk
+-include cts/build/config.mk
+
# ###############################################################
# Parse out any modifier targets.
# ###############################################################
@@ -147,6 +151,64 @@ include $(board_config_mk)
TARGET_DEVICE_DIR := $(patsubst %/,%,$(dir $(board_config_mk)))
board_config_mk :=
+# The build system exposes several variables for where to find the kernel
+# headers:
+# TARGET_DEVICE_KERNEL_HEADERS is automatically created for the current
+# device being built. It is set as $(TARGET_DEVICE_DIR)/kernel-headers,
+# e.g. device/samsung/tuna/kernel-headers. This directory is not
+# explicitly set by anyone, the build system always adds this subdir.
+#
+# TARGET_BOARD_KERNEL_HEADERS is specified by the BoardConfig.mk file
+# to allow other directories to be included. This is useful if there's
+# some common place where a few headers are being kept for a group
+# of devices. For example, device/<vendor>/common/kernel-headers could
+# contain some headers for several of <vendor>'s devices.
+#
+# TARGET_PRODUCT_KERNEL_HEADERS is generated by the product inheritance
+# graph. This allows architecture products to provide headers for the
+# devices using that architecture. For example,
+# hardware/ti/omap4xxx/omap4.mk will specify
+# PRODUCT_VENDOR_KERNEL_HEADERS variable that specify where the omap4
+# specific headers are, e.g. hardware/ti/omap4xxx/kernel-headers.
+# The build system then combines all the values specified by all the
+# PRODUCT_VENDOR_KERNEL_HEADERS directives in the product inheritance
+# tree and then exports a TARGET_PRODUCT_KERNEL_HEADERS variable.
+#
+# The layout of subdirs in any of the kernel-headers dir should mirror the
+# layout of the kernel include/ directory. For example,
+# device/samsung/tuna/kernel-headers/linux/,
+# hardware/ti/omap4xxx/kernel-headers/media/,
+# etc.
+#
+# NOTE: These directories MUST contain post-processed headers using the
+# bionic/libc/kernel/clean_header.py tool. Additionally, the original kernel
+# headers must also be checked in, but in a different subdirectory. By
+# convention, the originals should be checked into original-kernel-headers
+# directory of the same parent dir. For example,
+# device/samsung/tuna/kernel-headers <----- post-processed
+# device/samsung/tuna/original-kernel-headers <----- originals
+#
+TARGET_DEVICE_KERNEL_HEADERS := $(strip $(wildcard $(TARGET_DEVICE_DIR)/kernel-headers))
+
+define validate-kernel-headers
+$(if $(firstword $(foreach hdr_dir,$(1),\
+ $(filter-out kernel-headers,$(notdir $(hdr_dir))))),\
+ $(error Kernel header dirs must be end in kernel-headers: $(1)))
+endef
+# also allow the board config to provide additional directories since
+# there could be device/oem/base_hw and device/oem/derived_hw
+# that both are valid devices but derived_hw needs to use kernel headers
+# from base_hw.
+TARGET_BOARD_KERNEL_HEADERS := $(strip $(wildcard $(TARGET_BOARD_KERNEL_HEADERS)))
+TARGET_BOARD_KERNEL_HEADERS := $(patsubst %/,%,$(TARGET_BOARD_KERNEL_HEADERS))
+$(call validate-kernel-headers,$(TARGET_BOARD_KERNEL_HEADERS))
+
+# then add product-inherited includes, to allow for
+# hardware/sivendor/chip/chip.mk to include their own headers
+TARGET_PRODUCT_KERNEL_HEADERS := $(strip $(wildcard $(PRODUCT_VENDOR_KERNEL_HEADERS)))
+TARGET_PRODUCT_KERNEL_HEADERS := $(patsubst %/,%,$(TARGET_PRODUCT_KERNEL_HEADERS))
+$(call validate-kernel-headers,$(TARGET_PRODUCT_KERNEL_HEADERS))
+
# Clean up/verify variables defined by the board config file.
TARGET_BOOTLOADER_BOARD_NAME := $(strip $(TARGET_BOOTLOADER_BOARD_NAME))
TARGET_CPU_ABI := $(strip $(TARGET_CPU_ABI))
@@ -169,6 +231,14 @@ include $(BUILD_SYSTEM)/combo/select.mk
combo_target := TARGET_
include $(BUILD_SYSTEM)/combo/select.mk
+# Compute TARGET_TOOLCHAIN_ROOT from TARGET_TOOLS_PREFIX
+# if only TARGET_TOOLS_PREFIX is passed to the make command.
+ifndef TARGET_TOOLCHAIN_ROOT
+TARGET_TOOLCHAIN_ROOT := $(patsubst %/, %, $(dir $(TARGET_TOOLS_PREFIX)))
+TARGET_TOOLCHAIN_ROOT := $(patsubst %/, %, $(dir $(TARGET_TOOLCHAIN_ROOT)))
+TARGET_TOOLCHAIN_ROOT := $(wildcard $(TARGET_TOOLCHAIN_ROOT))
+endif
+
# Pick a Java compiler.
include $(BUILD_SYSTEM)/combo/javac.mk
@@ -318,7 +388,9 @@ HOST_GLOBAL_LD_DIRS += -L$(HOST_OUT_INTERMEDIATE_LIBRARIES)
TARGET_GLOBAL_LD_DIRS += -L$(TARGET_OUT_INTERMEDIATE_LIBRARIES)
HOST_PROJECT_INCLUDES:= $(SRC_HEADERS) $(SRC_HOST_HEADERS) $(HOST_OUT_HEADERS)
-TARGET_PROJECT_INCLUDES:= $(SRC_HEADERS) $(TARGET_OUT_HEADERS)
+TARGET_PROJECT_INCLUDES:= $(SRC_HEADERS) $(TARGET_OUT_HEADERS) \
+ $(TARGET_DEVICE_KERNEL_HEADERS) $(TARGET_BOARD_KERNEL_HEADERS) \
+ $(TARGET_PRODUCT_KERNEL_HEADERS)
# Many host compilers don't support these flags, so we have to make
# sure to only specify them for the target compilers checked in to
@@ -332,6 +404,9 @@ HOST_GLOBAL_CPPFLAGS += $(HOST_RELEASE_CPPFLAGS)
TARGET_GLOBAL_CFLAGS += $(TARGET_RELEASE_CFLAGS)
TARGET_GLOBAL_CPPFLAGS += $(TARGET_RELEASE_CPPFLAGS)
+# define llvm tools and global flags
+include $(BUILD_SYSTEM)/llvm_config.mk
+
PREBUILT_IS_PRESENT := $(if $(wildcard prebuilt/Android.mk),true)
# ###############################################################
@@ -339,8 +414,8 @@ PREBUILT_IS_PRESENT := $(if $(wildcard prebuilt/Android.mk),true)
# For use with the LOCAL_SDK_VERSION variable for include $(BUILD_PACKAGE)
# ###############################################################
-HISTORICAL_SDK_VERSIONS_ROOT := $(TOPDIR)prebuilt/sdk
-HISTORICAL_NDK_VERSIONS_ROOT := $(TOPDIR)prebuilt/ndk
+HISTORICAL_SDK_VERSIONS_ROOT := $(TOPDIR)prebuilts/sdk
+HISTORICAL_NDK_VERSIONS_ROOT := $(TOPDIR)prebuilts/ndk
# Historical SDK version N is stored in $(HISTORICAL_SDK_VERSIONS_ROOT)/N.
# The 'current' version is whatever this source tree is.
diff --git a/core/definitions.mk b/core/definitions.mk
index 867575a..0b7092f 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -78,6 +78,9 @@ INTERNAL_DALVIK_MODULES:=
# All findbugs xml files
ALL_FINDBUGS_FILES:=
+# GPL module license files
+ALL_GPL_MODULE_LICENSE_FILES:=
+
###########################################################
## Debugging; prints a variable list to stdout
###########################################################
@@ -691,7 +694,7 @@ define _get-package-overrides
endef
define get-package-overrides
-$(strip $(sort $(call _get-package-overrides,$(1))))
+$(sort $(strip $(call _get-package-overrides,$(1))))
endef
###########################################################
@@ -802,6 +805,7 @@ $(hide) $(PRIVATE_RS_CC) \
-d $(PRIVATE_RS_OUTPUT_DIR) \
-a $@ -MD \
$(addprefix -target-api , $(PRIVATE_RS_TARGET_API)) \
+ $(PRIVATE_RS_FLAGS) \
$(foreach inc,$(PRIVATE_RS_INCLUDES),$(addprefix -I , $(inc))) \
$(PRIVATE_RS_SOURCE_FILES)
#$(hide) $(LLVM_RS_LINK) \
@@ -848,7 +852,7 @@ $(hide) for f in $(PRIVATE_PROTO_SRC_FILES); do \
$(addprefix --proto_path=, $(PRIVATE_PROTO_INCLUDES)) \
$(PRIVATE_PROTO_JAVA_OUTPUT_OPTION)=$(PRIVATE_PROTO_JAVA_OUTPUT_DIR) \
$(PRIVATE_PROTOC_FLAGS) \
- $$f; \
+ $$f || exit 33; \
done
$(hide) touch $@
endef
@@ -890,7 +894,7 @@ $(hide) $(PRIVATE_CXX) \
$(PRIVATE_CFLAGS) \
$(PRIVATE_CPPFLAGS) \
$(PRIVATE_DEBUG_CFLAGS) \
- -MD -o $@ $<
+ -MD -MF $(patsubst %.o,%.d,$@) -o $@ $<
$(transform-d-to-p)
endef
@@ -917,7 +921,7 @@ $(hide) $(PRIVATE_CC) \
$(PRIVATE_CFLAGS) \
$(1) \
$(PRIVATE_DEBUG_CFLAGS) \
- -MD -o $@ $<
+ -MD -MF $(patsubst %.o,%.d,$@) -o $@ $<
endef
define transform-c-to-o-no-deps
@@ -978,7 +982,7 @@ $(hide) $(PRIVATE_CXX) \
$(PRIVATE_CFLAGS) \
$(PRIVATE_CPPFLAGS) \
$(PRIVATE_DEBUG_CFLAGS) \
- -MD -o $@ $<
+ -MD -MF $(patsubst %.o,%.d,$@) -o $@ $<
$(transform-d-to-p)
endef
@@ -1004,7 +1008,7 @@ $(hide) $(PRIVATE_CC) \
$(PRIVATE_CFLAGS) \
$(1) \
$(PRIVATE_DEBUG_CFLAGS) \
- -MD -o $@ $<
+ -MD -MF $(patsubst %.o,%.d,$@) -o $@ $<
endef
define transform-host-c-to-o-no-deps
@@ -1104,7 +1108,7 @@ $(hide) ldir=$(PRIVATE_INTERMEDIATES_DIR)/WHOLE/$(basename $(notdir $(1)))_objs;
rm -rf $$ldir; \
mkdir -p $$ldir; \
filelist=; \
- for f in `$(HOST_AR) t $(1) | grep '\.o$$'`; do \
+ for f in `$(HOST_AR) t $(1) | \grep '\.o$$'`; do \
$(HOST_AR) p $(1) $$f > $$ldir/$$f; \
filelist="$$filelist $$ldir/$$f"; \
done ; \
@@ -1292,13 +1296,6 @@ endef
ifneq ($(HOST_CUSTOM_LD_COMMAND),true)
define transform-host-o-to-executable-inner
$(hide) $(PRIVATE_CXX) \
- -Wl,-rpath-link=$(HOST_OUT_INTERMEDIATE_LIBRARIES) \
- -Wl,-rpath,\$$ORIGIN/../lib \
- $(HOST_GLOBAL_LD_DIRS) \
- $(PRIVATE_LDFLAGS) \
- $(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \
- $(HOST_GLOBAL_LDFLAGS) \
- ) \
$(PRIVATE_ALL_OBJECTS) \
-Wl,--whole-archive \
$(call normalize-host-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
@@ -1307,6 +1304,13 @@ $(hide) $(PRIVATE_CXX) \
$(call normalize-host-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \
$(if $(PRIVATE_GROUP_STATIC_LIBRARIES),-Wl$(comma)--end-group) \
$(call normalize-host-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
+ -Wl,-rpath-link=$(HOST_OUT_INTERMEDIATE_LIBRARIES) \
+ -Wl,-rpath,\$$ORIGIN/../lib \
+ $(HOST_GLOBAL_LD_DIRS) \
+ $(PRIVATE_LDFLAGS) \
+ $(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \
+ $(HOST_GLOBAL_LDFLAGS) \
+ ) \
-o $@ \
$(PRIVATE_LDLIBS)
endef
@@ -1444,7 +1448,8 @@ $(hide) if [ -d "$(PRIVATE_SOURCE_INTERMEDIATES_DIR)" ]; then \
fi
$(hide) tr ' ' '\n' < $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list \
| sort -u > $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq
-$(hide) $(1) -encoding UTF-8 \
+$(hide) if [ -s $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq ] ; then \
+ $(1) -encoding UTF-8 \
$(strip $(PRIVATE_JAVAC_DEBUG_FLAGS)) \
$(if $(findstring true,$(LOCAL_WARNINGS_ENABLE)),$(xlint_unchecked),) \
$(2) \
@@ -1454,11 +1459,14 @@ $(hide) $(1) -encoding UTF-8 \
-extdirs "" -d $(PRIVATE_CLASS_INTERMEDIATES_DIR) \
$(PRIVATE_JAVACFLAGS) \
\@$(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq \
- || ( rm -rf $(PRIVATE_CLASS_INTERMEDIATES_DIR) ; exit 41 )
-$(if $(PRIVATE_JAVA_LAYERS_FILE), $(hide) build/tools/java-layers.py \
- $(PRIVATE_JAVA_LAYERS_FILE) \@$(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq,)
+ || ( rm -rf $(PRIVATE_CLASS_INTERMEDIATES_DIR) ; exit 41 ) \
+fi
$(hide) rm -f $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list
$(hide) rm -f $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq
+$(if $(PRIVATE_JAR_EXCLUDE_FILES), $(hide) find $(PRIVATE_CLASS_INTERMEDIATES_DIR) \
+ -name $(word 1, $(PRIVATE_JAR_EXCLUDE_FILES)) \
+ $(addprefix -o -name , $(wordlist 2, 999, $(PRIVATE_JAR_EXCLUDE_FILES))) \
+ | xargs rm -rf)
$(hide) jar $(if $(strip $(PRIVATE_JAR_MANIFEST)),-cfm,-cf) \
$@ $(PRIVATE_JAR_MANIFEST) -C $(PRIVATE_CLASS_INTERMEDIATES_DIR) .
endef
@@ -1527,7 +1535,7 @@ define transform-classes.jar-to-dex
@echo "target Dex: $(PRIVATE_MODULE)"
@mkdir -p $(dir $@)
$(hide) $(DX) \
- $(if $(findstring windows,$(HOST_OS)),,-JXms16M -JXmx1536M) \
+ $(if $(findstring windows,$(HOST_OS)),,-JXms16M -JXmx2048M) \
--dex --output=$@ \
$(incremental_dex) \
$(if $(NO_OPTIMIZE_DX), \
@@ -1867,7 +1875,6 @@ $(if $(2), \
size=$$(for i in $(1); do $(call get-file-size,$$i); echo +; done; echo 0); \
total=$$(( $$( echo "$$size" ) )); \
printname=$$(echo -n "$(1)" | tr " " +); \
- echo "$$printname total size is $$total"; \
img_blocksize=$(call image-size-from-data-size,$(BOARD_FLASH_BLOCK_SIZE)); \
if [ "$(3)" == "yaffs" ]; then \
reservedblocks=8; \
@@ -1879,6 +1886,7 @@ $(if $(2), \
reserve=$$(((twoblocks > onepct ? twoblocks : onepct) + \
reservedblocks * img_blocksize)); \
maxsize=$$(($(2) - reserve)); \
+ echo "$$printname maxsize=$$maxsize blocksize=$$img_blocksize total=$$total reserve=$$reserve"; \
if [ "$$total" -gt "$$maxsize" ]; then \
echo "error: $$printname too large ($$total > [$(2) - $$reserve])"; \
false; \
@@ -1919,6 +1927,21 @@ $$(PRODUCT_OUT)/$(2) : $$(LOCAL_PATH)/$(1) | $$(ACP)
$$(transform-prebuilt-to-target)
endef
+# Version of add-radio-file that also arranges for the version of the
+# file to be checked against the contents of
+# $(TARGET_BOARD_INFO_FILE).
+# $(1): filename
+# $(2): name of version variable in board-info (eg, "version-baseband")
+define add-radio-file-checked
+ $(eval $(call add-radio-file-checked-internal,$(1),$(notdir $(1)),$(2)))
+endef
+define add-radio-file-checked-internal
+INSTALLED_RADIOIMAGE_TARGET += $$(PRODUCT_OUT)/$(2)
+BOARD_INFO_CHECK += $(3):$(LOCAL_PATH)/$(1)
+$$(PRODUCT_OUT)/$(2) : $$(LOCAL_PATH)/$(1) | $$(ACP)
+ $$(transform-prebuilt-to-target)
+endef
+
###########################################################
# Override the package defined in $(1), setting the
diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk
index b801ac2..38982c0 100644
--- a/core/dex_preopt.mk
+++ b/core/dex_preopt.mk
@@ -4,7 +4,7 @@
####################################
# TODO: replace it with device's BOOTCLASSPATH
-DEXPREOPT_BOOT_JARS := core:core-junit:bouncycastle:ext:framework:android.policy:services:apache-xml:filterfw
+DEXPREOPT_BOOT_JARS := core:core-junit:bouncycastle:ext:framework:android.policy:services:apache-xml
DEXPREOPT_BOOT_JARS_MODULES := $(subst :, ,$(DEXPREOPT_BOOT_JARS))
DEXPREOPT_BUILD_DIR := $(OUT_DIR)
diff --git a/core/droiddoc.mk b/core/droiddoc.mk
index 91d8166..47f599d 100644
--- a/core/droiddoc.mk
+++ b/core/droiddoc.mk
@@ -63,9 +63,17 @@ endif
ifneq ($(LOCAL_IS_HOST_MODULE),true)
-ifeq ($(LOCAL_JAVA_LIBRARIES),)
-LOCAL_JAVA_LIBRARIES := core ext framework
-endif
+ifneq ($(LOCAL_SDK_VERSION),)
+ ifeq ($(LOCAL_SDK_VERSION),current)
+ LOCAL_JAVA_LIBRARIES := android_stubs_current $(LOCAL_JAVA_LIBRARIES)
+ else
+ LOCAL_JAVA_LIBRARIES := sdk_v$(LOCAL_SDK_VERSION) $(LOCAL_JAVA_LIBRARIES)
+ endif
+else
+ LOCAL_JAVA_LIBRARIES := core ext framework $(LOCAL_JAVA_LIBRARIES)
+endif # LOCAL_SDK_VERSION
+LOCAL_JAVA_LIBRARIES := $(sort $(LOCAL_JAVA_LIBRARIES))
+
full_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
full_java_lib_deps := $(call java-lib-deps,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
diff --git a/core/dumpvar.mk b/core/dumpvar.mk
index e0de464..0f7dd8f 100644
--- a/core/dumpvar.mk
+++ b/core/dumpvar.mk
@@ -3,15 +3,26 @@
# what to add to the path given the config we have chosen.
ifeq ($(CALLED_FROM_SETUP),true)
+ifneq ($(filter /%,$(HOST_OUT_EXECUTABLES)),)
+ABP:=$(HOST_OUT_EXECUTABLES)
+else
ABP:=$(PWD)/$(HOST_OUT_EXECUTABLES)
+endif
+
+# Add the ARM toolchain bin dir if it actually exists
+ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-4.6/bin),)
+ # this should be copied to HOST_OUT_EXECUTABLES instead
+ ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-4.6/bin
+endif
-# Add the toolchain bin dir if it actually exists
-ifneq ($(wildcard $(PWD)/prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-linux-androideabi-4.4.x/bin),)
+# Add the x86 toolchain bin dir if it actually exists
+ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-android-linux-4.4.3/bin),)
# this should be copied to HOST_OUT_EXECUTABLES instead
- ABP:=$(ABP):$(PWD)/prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-linux-androideabi-4.4.x/bin
+ ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/x86/i686-android-linux-4.4.3/bin
endif
ANDROID_BUILD_PATHS := $(ABP)
ANDROID_PREBUILTS := prebuilt/$(HOST_PREBUILT_TAG)
+ANDROID_GCC_PREBUILTS := prebuilts/gcc/$(HOST_PREBUILT_TAG)
# The "dumpvar" stuff lets you say something like
#
@@ -38,7 +49,11 @@ ifdef dumpvar_goals
absolute_dumpvar := $(strip $(filter abs-%,$(dumpvar_goals)))
ifdef absolute_dumpvar
dumpvar_goals := $(patsubst abs-%,%,$(dumpvar_goals))
- DUMPVAR_VALUE := $(PWD)/$($(dumpvar_goals))
+ ifneq ($(filter /%,$($(dumpvar_goals))),)
+ DUMPVAR_VALUE := $($(dumpvar_goals))
+ else
+ DUMPVAR_VALUE := $(PWD)/$($(dumpvar_goals))
+ endif
dumpvar_target := dumpvar-abs-$(dumpvar_goals)
else
DUMPVAR_VALUE := $($(dumpvar_goals))
@@ -59,6 +74,7 @@ endif # CALLED_FROM_SETUP
ifneq ($(PRINT_BUILD_CONFIG),)
+HOST_OS_EXTRA:=$(shell python -c "import platform; print(platform.platform())")
$(info ============================================)
$(info PLATFORM_VERSION_CODENAME=$(PLATFORM_VERSION_CODENAME))
$(info PLATFORM_VERSION=$(PLATFORM_VERSION))
@@ -70,7 +86,9 @@ $(info TARGET_ARCH=$(TARGET_ARCH))
$(info TARGET_ARCH_VARIANT=$(TARGET_ARCH_VARIANT))
$(info HOST_ARCH=$(HOST_ARCH))
$(info HOST_OS=$(HOST_OS))
+$(info HOST_OS_EXTRA=$(HOST_OS_EXTRA))
$(info HOST_BUILD_TYPE=$(HOST_BUILD_TYPE))
$(info BUILD_ID=$(BUILD_ID))
+$(info OUT_DIR=$(OUT_DIR))
$(info ============================================)
endif
diff --git a/core/envsetup.mk b/core/envsetup.mk
index 6cd42c8..74e9100 100644
--- a/core/envsetup.mk
+++ b/core/envsetup.mk
@@ -102,6 +102,14 @@ else
HOST_PREBUILT_TAG := $(HOST_OS)-$(HOST_ARCH)
endif
+# TARGET_COPY_OUT_* are all relative to the staging directory, ie PRODUCT_OUT.
+# Define them here so they can be used in product config files.
+TARGET_COPY_OUT_SYSTEM := system
+TARGET_COPY_OUT_DATA := data
+TARGET_COPY_OUT_VENDOR := system/vendor
+TARGET_COPY_OUT_ROOT := root
+TARGET_COPY_OUT_RECOVERY := recovery
+
# Read the product specs so we an get TARGET_DEVICE and other
# variables that we need in order to locate the output files.
include $(BUILD_SYSTEM)/product_config.mk
@@ -133,7 +141,11 @@ endif
# figure out the output directories
ifeq (,$(strip $(OUT_DIR)))
+ifeq (,$(strip $(OUT_DIR_COMMON_BASE)))
OUT_DIR := $(TOPDIR)out
+else
+OUT_DIR := $(OUT_DIR_COMMON_BASE)/$(notdir $(PWD))
+endif
endif
DEBUG_OUT_DIR := $(OUT_DIR)/debug
@@ -182,7 +194,7 @@ TARGET_OUT_HEADERS:= $(TARGET_OUT_INTERMEDIATES)/include
TARGET_OUT_INTERMEDIATE_LIBRARIES := $(TARGET_OUT_INTERMEDIATES)/lib
TARGET_OUT_COMMON_INTERMEDIATES := $(TARGET_COMMON_OUT_ROOT)/obj
-TARGET_OUT := $(PRODUCT_OUT)/system
+TARGET_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_SYSTEM)
TARGET_OUT_EXECUTABLES:= $(TARGET_OUT)/bin
TARGET_OUT_OPTIONAL_EXECUTABLES:= $(TARGET_OUT)/xbin
TARGET_OUT_SHARED_LIBRARIES:= $(TARGET_OUT)/lib
@@ -195,7 +207,7 @@ TARGET_OUT_STATIC_LIBRARIES:= $(TARGET_OUT_INTERMEDIATES)/lib
TARGET_OUT_NOTICE_FILES:=$(TARGET_OUT_INTERMEDIATES)/NOTICE_FILES
TARGET_OUT_FAKE := $(PRODUCT_OUT)/fake_packages
-TARGET_OUT_DATA := $(PRODUCT_OUT)/data
+TARGET_OUT_DATA := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_DATA)
TARGET_OUT_DATA_EXECUTABLES:= $(TARGET_OUT_EXECUTABLES)
TARGET_OUT_DATA_SHARED_LIBRARIES:= $(TARGET_OUT_SHARED_LIBRARIES)
TARGET_OUT_DATA_JAVA_LIBRARIES:= $(TARGET_OUT_JAVA_LIBRARIES)
@@ -206,7 +218,9 @@ TARGET_OUT_DATA_ETC := $(TARGET_OUT_ETC)
TARGET_OUT_DATA_STATIC_LIBRARIES:= $(TARGET_OUT_STATIC_LIBRARIES)
TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest
-TARGET_OUT_VENDOR := $(PRODUCT_OUT)/system/vendor
+TARGET_OUT_CACHE := $(PRODUCT_OUT)/cache
+
+TARGET_OUT_VENDOR := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR)
TARGET_OUT_VENDOR_EXECUTABLES:= $(TARGET_OUT_VENDOR)/bin
TARGET_OUT_VENDOR_OPTIONAL_EXECUTABLES:= $(TARGET_OUT_VENDOR)/xbin
TARGET_OUT_VENDOR_SHARED_LIBRARIES:= $(TARGET_OUT_VENDOR)/lib
@@ -221,13 +235,13 @@ TARGET_ROOT_OUT_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)
TARGET_ROOT_OUT_SBIN_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/sbin
TARGET_ROOT_OUT_BIN_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)/bin
-TARGET_ROOT_OUT := $(PRODUCT_OUT)/root
+TARGET_ROOT_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ROOT)
TARGET_ROOT_OUT_BIN := $(TARGET_ROOT_OUT)/bin
TARGET_ROOT_OUT_SBIN := $(TARGET_ROOT_OUT)/sbin
TARGET_ROOT_OUT_ETC := $(TARGET_ROOT_OUT)/etc
TARGET_ROOT_OUT_USR := $(TARGET_ROOT_OUT)/usr
-TARGET_RECOVERY_OUT := $(PRODUCT_OUT)/recovery
+TARGET_RECOVERY_OUT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_RECOVERY)
TARGET_RECOVERY_ROOT_OUT := $(TARGET_RECOVERY_OUT)/root
TARGET_SYSLOADER_OUT := $(PRODUCT_OUT)/sysloader
diff --git a/core/find-jdk-tools-jar.sh b/core/find-jdk-tools-jar.sh
index e1278c3..f150a9a 100755
--- a/core/find-jdk-tools-jar.sh
+++ b/core/find-jdk-tools-jar.sh
@@ -1,3 +1,4 @@
+#!/bin/sh
if [ "x$ANDROID_JAVA_HOME" != x ] && [ -e "$ANDROID_JAVA_HOME/lib/tools.jar" ] ; then
echo $ANDROID_JAVA_HOME/lib/tools.jar
else
diff --git a/core/host_java_library.mk b/core/host_java_library.mk
index 322d10f..6cc0b1f 100644
--- a/core/host_java_library.mk
+++ b/core/host_java_library.mk
@@ -52,6 +52,7 @@ $(LOCAL_INTERMEDIATE_TARGETS): \
$(cleantarget): PRIVATE_CLEAN_FILES += $(intermediates.COMMON)
$(full_classes_compiled_jar): PRIVATE_JAVACFLAGS := $(LOCAL_JAVACFLAGS)
+$(full_classes_compiled_jar): PRIVATE_JAR_EXCLUDE_FILES :=
$(full_classes_compiled_jar): $(java_sources) $(java_resource_sources) $(full_java_lib_deps) $(jar_manifest_file)
$(transform-host-java-to-package)
@@ -87,6 +88,7 @@ endif
else
$(LOCAL_BUILT_MODULE): PRIVATE_JAVACFLAGS := $(LOCAL_JAVACFLAGS)
+$(LOCAL_BUILT_MODULE): PRIVATE_JAR_EXCLUDE_FILES :=
$(LOCAL_BUILT_MODULE): $(java_sources) $(java_resource_sources) $(full_java_lib_deps) $(jar_manifest_file)
$(transform-host-java-to-package)
endif # LOCAL_BUILD_HOST_DEX
diff --git a/core/java.mk b/core/java.mk
index 0c51da3..b302c9f 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -5,7 +5,7 @@
# Make sure there's something to build.
# It's possible to build a package that doesn't contain any classes.
-ifeq (,$(strip $(LOCAL_SRC_FILES)$(all_res_assets)))
+ifeq (,$(strip $(LOCAL_SRC_FILES)$(all_res_assets)$(LOCAL_STATIC_JAVA_LIBRARIES)))
$(error $(LOCAL_PATH): Target java module does not define any source or resource files)
endif
@@ -21,7 +21,7 @@ ifneq ($(LOCAL_SDK_VERSION),)
Choices are: $(TARGET_AVAILABLE_SDK_VERSIONS))
else
ifeq ($(LOCAL_SDK_VERSION),current)
- LOCAL_JAVA_LIBRARIES := android_stubs_$(LOCAL_SDK_VERSION) $(LOCAL_JAVA_LIBRARIES)
+ LOCAL_JAVA_LIBRARIES := android_stubs_current $(LOCAL_JAVA_LIBRARIES)
else
LOCAL_JAVA_LIBRARIES := sdk_v$(LOCAL_SDK_VERSION) $(LOCAL_JAVA_LIBRARIES)
endif
@@ -29,7 +29,7 @@ ifneq ($(LOCAL_SDK_VERSION),)
endif
else
ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
- LOCAL_JAVA_LIBRARIES := core core-junit ext framework filterfw $(LOCAL_JAVA_LIBRARIES)
+ LOCAL_JAVA_LIBRARIES := core core-junit ext framework $(LOCAL_JAVA_LIBRARIES)
endif
endif
@@ -152,16 +152,21 @@ ifeq ($(LOCAL_RENDERSCRIPT_CC),)
LOCAL_RENDERSCRIPT_CC := $(LLVM_RS_CC)
endif
+# Turn on all warnings and warnings as errors for RS compiles.
+# This can be disabled with LOCAL_RENDERSCRIPT_FLAGS := -Wno-error
+renderscript_flags := -Wall -Werror
+renderscript_flags += $(LOCAL_RENDERSCRIPT_FLAGS)
+
# prepend the RenderScript system include path
ifneq ($(filter-out current,$(LOCAL_SDK_VERSION)),)
LOCAL_RENDERSCRIPT_INCLUDES := \
- $(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_VERSION)/renderscript/clang-include \
- $(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_VERSION)/renderscript/include \
+ $(HISTORICAL_SDK_VERSIONS_ROOT)/renderscript/clang-include \
+ $(HISTORICAL_SDK_VERSIONS_ROOT)/renderscript/include \
$(LOCAL_RENDERSCRIPT_INCLUDES)
else
LOCAL_RENDERSCRIPT_INCLUDES := \
$(TOPDIR)external/clang/lib/Headers \
- $(TOPDIR)frameworks/base/libs/rs/scriptc \
+ $(TOPDIR)frameworks/rs/scriptc \
$(LOCAL_RENDERSCRIPT_INCLUDES)
endif
@@ -171,6 +176,7 @@ endif
$(RenderScript_file_stamp): PRIVATE_RS_INCLUDES := $(LOCAL_RENDERSCRIPT_INCLUDES)
$(RenderScript_file_stamp): PRIVATE_RS_CC := $(LOCAL_RENDERSCRIPT_CC)
+$(RenderScript_file_stamp): PRIVATE_RS_FLAGS := $(renderscript_flags)
$(RenderScript_file_stamp): PRIVATE_RS_SOURCE_FILES := $(renderscript_sources_fullpath)
# By putting the generated java files into $(LOCAL_INTERMEDIATE_SOURCE_DIR), they will be
# automatically found by the java compiling function transform-java-to-classes.jar.
@@ -214,7 +220,7 @@ $(cleantarget): PRIVATE_CLEAN_FILES += $(intermediates.COMMON)
# If the module includes java code (i.e., it's not framework-res), compile it.
full_classes_jar :=
built_dex :=
-ifneq (,$(strip $(all_java_sources)))
+ifneq (,$(strip $(all_java_sources)$(full_static_java_libs)))
# If LOCAL_BUILT_MODULE_STEM wasn't overridden by our caller,
# full_classes_jar will be the same module as LOCAL_BUILT_MODULE.
@@ -238,19 +244,14 @@ $(full_classes_stubs_jar) : $(LOCAL_BUILT_MODULE) | $(ACP)
$(hide) $(ACP) -fp $(PRIVATE_SOURCE_FILE) $@
ALL_MODULES.$(LOCAL_MODULE).STUBS := $(full_classes_stubs_jar)
-# The layers file allows you to enforce a layering between java packages.
-# Run build/tools/java-layers.py for more details.
-layers_file := $(addprefix $(LOCAL_PATH)/, $(LOCAL_JAVA_LAYERS_FILE))
-$(full_classes_compiled_jar): PRIVATE_JAVA_LAYERS_FILE := $(layers_file)
-
# Compile the java files to a .jar file.
# This intentionally depends on java_sources, not all_java_sources.
# Deps for generated source files must be handled separately,
# via deps on the target that generates the sources.
$(full_classes_compiled_jar): PRIVATE_JAVACFLAGS := $(LOCAL_JAVACFLAGS)
-$(full_classes_compiled_jar): $(java_sources) $(java_resource_sources) $(full_java_lib_deps)\
- $(jar_manifest_file) $(layers_file) \
- $(RenderScript_file_stamp) $(proto_java_sources_file_stamp)
+$(full_classes_compiled_jar): PRIVATE_JAR_EXCLUDE_FILES := $(LOCAL_JAR_EXCLUDE_FILES)
+$(full_classes_compiled_jar): $(java_sources) $(java_resource_sources) $(full_java_lib_deps) $(jar_manifest_file) \
+ $(RenderScript_file_stamp) $(proto_java_sources_file_stamp)
$(transform-java-to-classes.jar)
# All of the rules after full_classes_compiled_jar are very unlikely
diff --git a/core/java_library.mk b/core/java_library.mk
index fa40c0e..06cdfc4 100644
--- a/core/java_library.mk
+++ b/core/java_library.mk
@@ -14,9 +14,11 @@ ifneq (,$(LOCAL_ASSET_DIR))
$(error $(LOCAL_PATH): Target java libraries may not set LOCAL_ASSET_DIR)
endif
+ifneq (true,$(LOCAL_IS_STATIC_JAVA_LIBRARY))
ifneq (,$(LOCAL_RESOURCE_DIR))
$(error $(LOCAL_PATH): Target java libraries may not set LOCAL_RESOURCE_DIR)
endif
+endif
#xxx base_rules.mk looks at this
all_res_assets :=
@@ -90,6 +92,7 @@ $(built_odex) : $(DEXPREOPT_BOOT_ODEXS)
$(built_odex) : $(common_javalib.jar) | $(DEXPREOPT) $(DEXOPT)
@echo "Dexpreopt Jar: $(PRIVATE_MODULE) ($@)"
$(hide) rm -f $@
+ @mkdir -p $(dir $@)
$(call dexpreopt-one-file,$<,$@)
$(LOCAL_BUILT_MODULE) : $(common_javalib.jar) | $(ACP) $(AAPT)
diff --git a/core/legacy_prebuilts.mk b/core/legacy_prebuilts.mk
index 41943b1..c25880d 100644
--- a/core/legacy_prebuilts.mk
+++ b/core/legacy_prebuilts.mk
@@ -43,6 +43,7 @@ GRANDFATHERED_ALL_PREBUILT := \
cdt.bin \
chat-ril \
cmu6plus.ok.zip \
+ content \
cpcap-key.kl \
data \
dbus.conf \
diff --git a/core/llvm_config.mk b/core/llvm_config.mk
new file mode 100644
index 0000000..bebc08c
--- /dev/null
+++ b/core/llvm_config.mk
@@ -0,0 +1,66 @@
+CLANG := $(HOST_OUT_EXECUTABLES)/clang$(HOST_EXECUTABLE_SUFFIX)
+CLANG_CXX := $(HOST_OUT_EXECUTABLES)/clang++$(HOST_EXECUTABLE_SUFFIX)
+LLVM_LINK := $(HOST_OUT_EXECUTABLES)/llvm-link$(HOST_EXECUTABLE_SUFFIX)
+
+define do-clang-flags-subst
+ TARGET_GLOBAL_CLANG_FLAGS := $(subst $(1),$(2),$(TARGET_GLOBAL_CLANG_FLAGS))
+ HOST_GLOBAL_CLANG_FLAGS := $(subst $(1),$(2),$(HOST_GLOBAL_CLANG_FLAGS))
+endef
+
+define clang-flags-subst
+ $(eval $(call do-clang-flags-subst,$(1),$(2)))
+endef
+
+
+CLANG_CONFIG_EXTRA_CFLAGS := \
+ -D__compiler_offsetof=__builtin_offsetof \
+ -Dnan=__builtin_nan \
+
+CLANG_CONFIG_UNKNOWN_CFLAGS := \
+ -funswitch-loops
+
+ifeq ($(TARGET_ARCH),arm)
+ CLANG_CONFIG_EXTRA_CFLAGS += \
+ -target arm-linux-androideabi \
+ -nostdlibinc \
+ -B$(TARGET_TOOLCHAIN_ROOT)/arm-linux-androideabi/bin \
+ -mllvm -arm-enable-ehabi
+ CLANG_CONFIG_EXTRA_LDFLAGS += \
+ -target arm-linux-androideabi \
+ -B$(TARGET_TOOLCHAIN_ROOT)/arm-linux-androideabi/bin
+ CLANG_CONFIG_UNKNOWN_CFLAGS += \
+ -mthumb-interwork \
+ -fgcse-after-reload \
+ -frerun-cse-after-loop \
+ -frename-registers \
+ -Wa,--noexecstack
+endif
+ifeq ($(TARGET_ARCH),x86)
+ CLANG_CONFIG_EXTRA_CFLAGS += \
+ -target i686-android-linux \
+ -nostdlibinc \
+ -B$(TARGET_TOOLCHAIN_ROOT)/i686-android-linux/bin
+ CLANG_CONFIG_EXTRA_LDFLAGS += \
+ -target i686-android-linux \
+ -B$(TARGET_TOOLCHAIN_ROOT)/i686-android-linux/bin
+ CLANG_CONFIG_UNKNOWN_CFLAGS += \
+ -finline-limit=300 \
+ -fno-inline-functions-called-once \
+ -mfpmath=sse \
+ -mbionic
+endif
+
+CLANG_CONFIG_EXTRA_TARGET_C_INCLUDES := external/clang/lib/include
+
+# remove unknown flags to define CLANG_FLAGS
+TARGET_GLOBAL_CLANG_FLAGS += $(filter-out $(CLANG_CONFIG_UNKNOWN_CFLAGS),$(TARGET_GLOBAL_CFLAGS))
+HOST_GLOBAL_CLANG_FLAGS += $(filter-out $(CLANG_CONFIG_UNKNOWN_CFLAGS),$(HOST_GLOBAL_CFLAGS))
+
+# llvm does not yet support -march=armv5e nor -march=armv5te, fall back to armv5 or armv5t
+$(call clang-flags-subst,-march=armv5te,-march=armv5t)
+$(call clang-flags-subst,-march=armv5e,-march=armv5)
+
+ADDRESS_SANITIZER_CONFIG_EXTRA_CFLAGS := -faddress-sanitizer
+ADDRESS_SANITIZER_CONFIG_EXTRA_LDFLAGS := -Wl,-u,__asan_preinit
+ADDRESS_SANITIZER_CONFIG_EXTRA_SHARED_LIBRARIES := libdl libasan_preload
+ADDRESS_SANITIZER_CONFIG_EXTRA_STATIC_LIBRARIES := libasan
diff --git a/core/main.mk b/core/main.mk
index 89cbc63..15e8973 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -37,15 +37,20 @@ endif
#TOPDIR := $(TOP)/
#endif
-# check for broken versions of make
+# Check for broken versions of make.
+# (Allow any version under Cygwin since we don't actually build the platform there.)
+ifeq (,$(findstring CYGWIN,$(shell uname -sm)))
ifeq (0,$(shell expr $$(echo $(MAKE_VERSION) | sed "s/[^0-9\.].*//") = 3.81))
+ifeq (0,$(shell expr $$(echo $(MAKE_VERSION) | sed "s/[^0-9\.].*//") = 3.82))
$(warning ********************************************************************************)
$(warning * You are using version $(MAKE_VERSION) of make.)
-$(warning * Android can only be built by version 3.81.)
+$(warning * Android can only be built by versions 3.81 and 3.82.)
$(warning * see http://source.android.com/source/download.html)
$(warning ********************************************************************************)
$(error stopping)
endif
+endif
+endif
TOP := .
TOPDIR :=
@@ -178,7 +183,7 @@ include $(BUILD_SYSTEM)/definitions.mk
# Bring in dex_preopt.mk
include $(BUILD_SYSTEM)/dex_preopt.mk
-ifneq ($(filter eng user userdebug tests,$(MAKECMDGOALS)),)
+ifneq ($(filter eng user userdebug,$(MAKECMDGOALS)),)
$(info ***************************************************************)
$(info ***************************************************************)
$(info Don't pass '$(filter eng user userdebug tests,$(MAKECMDGOALS))' on \
@@ -202,6 +207,11 @@ $(info ***************************************************************)
$(error stopping)
endif
+# -----------------------------------------------------------------
+# The pdk (Platform Development Kit) build
+include build/core/pdk_config.mk
+
+# -----------------------------------------------------------------
###
### In this section we set up the things that are different
### between the build variants
@@ -271,11 +281,13 @@ endif # !enable_target_debugging
ifeq ($(TARGET_BUILD_VARIANT),eng)
tags_to_install := user debug eng
+ifneq ($(filter ro.setupwizard.mode=ENABLED, $(call collapse-pairs, $(ADDITIONAL_BUILD_PROPERTIES))),)
# Don't require the setup wizard on eng builds
ADDITIONAL_BUILD_PROPERTIES := $(filter-out ro.setupwizard.mode=%,\
$(call collapse-pairs, $(ADDITIONAL_BUILD_PROPERTIES))) \
ro.setupwizard.mode=OPTIONAL
endif
+endif
## tests ##
@@ -315,17 +327,6 @@ ifneq ($(filter dalvik.gc.type-precise,$(PRODUCT_TAGS)),)
ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.dexopt-flags=m=y
endif
-ifneq ($(BUILD_TINY_ANDROID),true)
-# Install an apns-conf.xml file if one's not already being installed.
-ifeq (,$(filter %:system/etc/apns-conf.xml, $(PRODUCT_COPY_FILES)))
- PRODUCT_COPY_FILES += \
- development/data/etc/apns-conf_sdk.xml:system/etc/apns-conf.xml
- ifeq ($(filter eng tests,$(TARGET_BUILD_VARIANT)),)
- $(warning implicitly installing apns-conf_sdk.xml)
- endif
-endif
-endif
-
ADDITIONAL_BUILD_PROPERTIES += net.bt.name=Android
# enable vm tracing in files for now to help track
@@ -387,74 +388,8 @@ SDK_ONLY := true
endif
ifeq ($(SDK_ONLY),true)
-
-# ----- SDK for Windows ------
-# These configure the build targets that are available for the SDK under Windows.
-# The first section defines all the C/C++ tools that can be compiled in C/C++,
-# the second section defines all the Java ones (assuming javac is available.)
-
-subdirs := \
- prebuilt \
- build/libs/host \
- build/tools/zipalign \
- dalvik/dexdump \
- dalvik/libdex \
- dalvik/tools/dmtracedump \
- dalvik/tools/hprof-conv \
- development/host \
- development/tools/etc1tool \
- development/tools/line_endings \
- development/tools/emulator/opengl \
- external/clang \
- external/easymock \
- external/expat \
- external/libpng \
- external/llvm \
- external/qemu \
- external/sqlite/dist \
- external/zlib \
- frameworks/base \
- frameworks/compile \
- sdk/avdlauncher \
- sdk/emulator/mksdcard \
- sdk/sdklauncher \
- system/core/adb \
- system/core/fastboot \
- system/core/libcutils \
- system/core/liblog \
- system/core/libzipfile
-
-# The following can only be built if "javac" is available.
-# This check is used when building parts of the SDK under Cygwin.
-ifneq (,$(shell which javac 2>/dev/null))
-subdirs += \
- build/tools/signapk \
- dalvik/dx \
- libcore \
- sdk/archquery \
- sdk/androidprefs \
- sdk/apkbuilder \
- sdk/assetstudio \
- sdk/common \
- sdk/ddms \
- sdk/hierarchyviewer2 \
- sdk/ide_common \
- sdk/jarutils \
- sdk/layoutlib_api \
- sdk/layoutopt \
- sdk/ninepatch \
- sdk/rule_api \
- sdk/lint \
- sdk/sdkstats \
- sdk/sdkmanager \
- sdk/swtmenubar \
- sdk/traceview \
- development/apps \
- development/tools/mkstubs \
- packages
-else
-$(warning SDK_ONLY: javac not available.)
-endif
+include $(TOPDIR)sdk/build/sdk_only_whitelist.mk
+include $(TOPDIR)development/build/sdk_only_whitelist.mk
# Exclude tools/acp when cross-compiling windows under linux
ifeq ($(findstring Linux,$(UNAME)),)
@@ -475,21 +410,16 @@ subdirs := \
build/libs \
build/target \
build/tools/acp \
+ external/gcc-demangle \
external/mksh \
external/yaffs2 \
external/zlib
else # !BUILD_TINY_ANDROID
-
-ifneq ($(TARGET_SUBDIRS),)
-subdirs := $(TARGET_SUBDIRS)
-else
#
# Typical build; include any Android.mk files we can find.
#
subdirs := $(TOP)
-endif # !TARGET_SUBDIRS
-
FULL_BUILD := true
endif # !BUILD_TINY_ANDROID
@@ -752,6 +682,9 @@ endif
.PHONY: userdatatarball
userdatatarball: $(INSTALLED_USERDATATARBALL_TARGET)
+.PHONY: cacheimage
+cacheimage: $(INSTALLED_CACHEIMAGE_TARGET)
+
.PHONY: bootimage
bootimage: $(INSTALLED_BOOTIMAGE_TARGET)
@@ -766,6 +699,7 @@ droidcore: files \
$(INSTALLED_BOOTIMAGE_TARGET) \
$(INSTALLED_RECOVERYIMAGE_TARGET) \
$(INSTALLED_USERDATAIMAGE_TARGET) \
+ $(INSTALLED_CACHEIMAGE_TARGET) \
$(INSTALLED_FILES_FILE)
# dist_files only for putting your library into the dist directory with a full build.
@@ -804,9 +738,6 @@ else # TARGET_BUILD_APPS
$(INTERNAL_UPDATE_PACKAGE_TARGET) \
$(INTERNAL_OTA_PACKAGE_TARGET) \
$(SYMBOLS_ZIP) \
- $(APPS_ZIP) \
- $(INTERNAL_EMULATOR_PACKAGE_TARGET) \
- $(PACKAGE_STATS_FILE) \
$(INSTALLED_FILES_FILE) \
$(INSTALLED_BUILD_PROP_TARGET) \
$(BUILT_TARGET_FILES_PACKAGE) \
@@ -815,6 +746,14 @@ else # TARGET_BUILD_APPS
$(INSTALLED_FACTORY_RAMDISK_TARGET) \
)
+ ifneq ($(TARGET_BUILD_PDK),true)
+ $(call dist-for-goals, droidcore, \
+ $(APPS_ZIP) \
+ $(INTERNAL_EMULATOR_PACKAGE_TARGET) \
+ $(PACKAGE_STATS_FILE) \
+ )
+ endif
+
# Building a full system-- the default is to build droidcore
droid: droidcore dist_files
@@ -822,8 +761,7 @@ endif # TARGET_BUILD_APPS
endif # droid in $(MAKECMDGOALS)
-.PHONY: droid tests
-tests: droidcore
+.PHONY: droid
# phony target that include any targets in $(ALL_MODULES)
.PHONY: all_modules
diff --git a/core/pathmap.mk b/core/pathmap.mk
index 60fbfd2..581cf83 100644
--- a/core/pathmap.mk
+++ b/core/pathmap.mk
@@ -31,9 +31,11 @@ pathmap_INCL := \
bluez:external/bluetooth/bluez \
glib:external/bluetooth/glib \
bootloader:bootable/bootloader/legacy/include \
+ camera:system/media/camera/include \
corecg:external/skia/include/core \
dbus:external/dbus \
frameworks-base:frameworks/base/include \
+ frameworks-native:frameworks/native/include \
graphics:external/skia/include/core \
libc:bionic/libc/include \
libdrm1:frameworks/base/media/libdrm/mobile1/include \
@@ -47,8 +49,13 @@ pathmap_INCL := \
libstdc++:bionic/libstdc++/include \
libthread_db:bionic/libthread_db/include \
mkbootimg:system/core/mkbootimg \
+ opengl-tests-includes:frameworks/native/opengl/tests/include \
recovery:bootable/recovery \
system-core:system/core/include \
+ audio-effects:system/media/audio_effects/include \
+ audio-utils:system/media/audio_utils/include \
+ wilhelm:frameworks/wilhelm/include \
+ wilhelm-ut:frameworks/wilhelm/src/ut \
speex:external/speex/include
#
@@ -83,6 +90,9 @@ FRAMEWORKS_BASE_SUBDIRS := \
graphics \
location \
media \
+ media/mca/effect \
+ media/mca/filterfw \
+ media/mca/filterpacks \
drm \
opengl \
sax \
diff --git a/core/pdk_config.mk b/core/pdk_config.mk
new file mode 100644
index 0000000..98f34a5
--- /dev/null
+++ b/core/pdk_config.mk
@@ -0,0 +1,66 @@
+# This file defines the rule to fuse the platform.zip into the current PDK build.
+
+.PHONY: pdk fusion
+pdk fusion: $(DEFAULT_GOAL)
+
+# What to build:
+# pdk fusion if:
+# 1) the platform.zip exists in the default location
+# or
+# 2) PDK_FUSION_PLATFORM_ZIP is passed in from the environment
+# or
+# 3) fusion is a command line build goal,
+# PDK_FUSION_PLATFORM_ZIP is needed anyway, then do we need the 'fusion' goal?
+# otherwise pdk only if:
+# 1) pdk is a command line build goal
+# or
+# 2) TARGET_BUILD_PDK is passed in from the environment
+
+# TODO: what's the best default location?
+_pdk_fusion_default_platform_zip := $(OUT_DIR)/platform.zip
+ifneq (,$(wildcard $(_pdk_fusion_default_platform_zip)))
+$(info $(_pdk_fusion_default_platform_zip) found, do a PDK fusion build.)
+PDK_FUSION_PLATFORM_ZIP := $(_pdk_fusion_default_platform_zip)
+TARGET_BUILD_PDK := true
+endif
+
+ifneq (,$(filter pdk fusion, $(MAKECMDGOALS)))
+TARGET_BUILD_PDK := true
+ifneq (,$(filter fusion, $(MAKECMDGOALS)))
+ifndef PDK_FUSION_PLATFORM_ZIP
+ $(error Specify PDK_FUSION_PLATFORM_ZIP to do a PDK fusion.)
+endif
+endif # fusion
+endif # pdk or fusion
+
+ifdef PDK_FUSION_PLATFORM_ZIP
+TARGET_BUILD_PDK := true
+ifeq (,$(wildcard $(PDK_FUSION_PLATFORM_ZIP)))
+ $(error Cannot find file $(PDK_FUSION_PLATFORM_ZIP).)
+endif
+
+_pdk_fusion_intermediates := $(call intermediates-dir-for, PACKAGING, pdk_fusion)
+_pdk_fusion_stamp := $(_pdk_fusion_intermediates)/pdk_fusion.stamp
+
+$(_pdk_fusion_stamp) : $(PDK_FUSION_PLATFORM_ZIP)
+ @echo "Unzip $(dir $@) <- $<"
+ $(hide) rm -rf $(dir $@) && mkdir -p $(dir $@)
+ $(hide) unzip -qo $< -d $(dir $@)
+ $(hide) touch $@
+
+_pdk_fusion_file_list := $(shell unzip -Z -1 $(PDK_FUSION_PLATFORM_ZIP) '*[^/]' 2>/dev/null)
+_pdk_fusion_files := $(addprefix $(_pdk_fusion_intermediates)/, $(_pdk_fusion_file_list))
+$(_pdk_fusion_files) : $(_pdk_fusion_stamp)
+
+# Implicit pattern rules to copy the fusion files to the system image directory.
+# Note that if there is already explicit rule in the build system to generate a file,
+# the pattern rule will be just ignored by make.
+# That's desired by us: we want only absent files from the platform zip package.
+# Copy with the last-modified time preserved, never follow symbolic links.
+$(PRODUCT_OUT)/% : $(_pdk_fusion_intermediates)/%
+ @mkdir -p $(dir $@)
+ $(hide) cp -fpPR $< $@
+
+ALL_PDK_FUSION_FILES := $(addprefix $(PRODUCT_OUT)/, $(_pdk_fusion_file_list))
+
+endif
diff --git a/core/product.mk b/core/product.mk
index 4d4c983..b001ca2 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -84,7 +84,9 @@ _product_var_list := \
PRODUCT_SDK_ADDON_DOC_MODULES \
PRODUCT_DEFAULT_WIFI_CHANNELS \
PRODUCT_DEFAULT_DEV_CERTIFICATE \
+ PRODUCT_RESTRICT_VENDOR_FILES \
PRODUCT_FACTORY_RAMDISK_MODULES \
+ PRODUCT_VENDOR_KERNEL_HEADERS \
define dump-product
@@ -200,6 +202,9 @@ _product_stash_var_list := $(_product_var_list) \
TARGET_ARCH_VARIANT \
TARGET_BOARD_PLATFORM \
TARGET_BOARD_PLATFORM_GPU \
+ TARGET_BOARD_KERNEL_HEADERS \
+ TARGET_DEVICE_KERNEL_HEADERS \
+ TARGET_PRODUCT_KERNEL_HEADERS \
TARGET_BOOTLOADER_BOARD_NAME \
TARGET_COMPRESS_MODULE_SYMBOLS \
TARGET_NO_BOOTLOADER \
@@ -228,6 +233,8 @@ _product_stash_var_list += \
BOARD_RECOVERYIMAGE_PARTITION_SIZE \
BOARD_SYSTEMIMAGE_PARTITION_SIZE \
BOARD_USERDATAIMAGE_PARTITION_SIZE \
+ BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE \
+ BOARD_CACHEIMAGE_PARTITION_SIZE \
BOARD_FLASH_BLOCK_SIZE \
BOARD_SYSTEMIMAGE_PARTITION_SIZE \
BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE \
diff --git a/core/product_config.mk b/core/product_config.mk
index c455723..ea3e517 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -306,6 +306,10 @@ DEVICE_PACKAGE_OVERLAYS := \
# An list of whitespace-separated words.
PRODUCT_TAGS := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_TAGS))
+# The list of product-specific kernel header dirs
+PRODUCT_VENDOR_KERNEL_HEADERS := \
+ $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VENDOR_KERNEL_HEADERS)
+
# Add the product-defined properties to the build properties.
ADDITIONAL_BUILD_PROPERTIES := \
$(ADDITIONAL_BUILD_PROPERTIES) \
diff --git a/core/static_java_library.mk b/core/static_java_library.mk
index 93d770a..0b2f63b 100644
--- a/core/static_java_library.mk
+++ b/core/static_java_library.mk
@@ -21,5 +21,88 @@
LOCAL_UNINSTALLABLE_MODULE := true
LOCAL_IS_STATIC_JAVA_LIBRARY := true
+
+# Hack to build static Java library with Android resource
+# See bug 5714516
+all_resources :=
+ifdef LOCAL_RESOURCE_DIR
+all_resources := $(strip \
+ $(foreach dir, $(LOCAL_RESOURCE_DIR), \
+ $(addprefix $(dir)/, \
+ $(patsubst res/%,%, \
+ $(call find-subdir-assets,$(dir)) \
+ ) \
+ ) \
+ ))
+
+ifneq (,$(all_resources))
+# Those files will be excluded from the built jar.
+# The R/Manifest classes should be re-generated in the app Module instead.
+# Use '' and $ escape because they will be passed to bash.
+LOCAL_JAR_EXCLUDE_FILES := 'R.class' 'R$$*.class' 'Manifest.class' 'Manifest$$*.class'
+endif
+endif
+
include $(BUILD_SYSTEM)/java_library.mk
+
+ifneq (,$(all_resources))
+R_file_stamp := $(LOCAL_INTERMEDIATE_SOURCE_DIR)/R.stamp
+
+ifeq ($(strip $(LOCAL_MANIFEST_FILE)),)
+LOCAL_MANIFEST_FILE := AndroidManifest.xml
+endif
+full_android_manifest := $(LOCAL_PATH)/$(LOCAL_MANIFEST_FILE)
+
+LOCAL_SDK_RES_VERSION:=$(strip $(LOCAL_SDK_RES_VERSION))
+ifeq ($(LOCAL_SDK_RES_VERSION),)
+ LOCAL_SDK_RES_VERSION:=$(LOCAL_SDK_VERSION)
+endif
+
+framework_res_package_export :=
+framework_res_package_export_deps :=
+# Please refer to package.mk
+ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
+ifneq ($(filter-out current,$(LOCAL_SDK_RES_VERSION)),)
+framework_res_package_export := \
+ $(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_RES_VERSION)/android.jar
+framework_res_package_export_deps := $(framework_res_package_export)
+else
+framework_res_package_export := \
+ $(call intermediates-dir-for,APPS,framework-res,,COMMON)/package-export.apk
+framework_res_package_export_deps := \
+ $(dir $(framework_res_package_export))src/R.stamp
+endif
+endif
+
+$(R_file_stamp): PRIVATE_MODULE := $(LOCAL_MODULE)
+# add --non-constant-id to prevent inlining constants.
+$(R_file_stamp): PRIVATE_AAPT_FLAGS := $(LOCAL_AAPT_FLAGS) --non-constant-id
+$(R_file_stamp): PRIVATE_SOURCE_INTERMEDIATES_DIR := $(LOCAL_INTERMEDIATE_SOURCE_DIR)
+$(R_file_stamp): PRIVATE_ANDROID_MANIFEST := $(full_android_manifest)
+$(R_file_stamp): PRIVATE_RESOURCE_PUBLICS_OUTPUT := $(intermediates.COMMON)/public_resources.xml
+$(R_file_stamp): PRIVATE_RESOURCE_DIR := $(LOCAL_RESOURCE_DIR)
+$(R_file_stamp): PRIVATE_AAPT_INCLUDES := $(framework_res_package_export)
+ifneq (,$(filter-out current, $(LOCAL_SDK_VERSION)))
+$(R_file_stamp): PRIVATE_DEFAULT_APP_TARGET_SDK := $(LOCAL_SDK_VERSION)
+else
+$(R_file_stamp): PRIVATE_DEFAULT_APP_TARGET_SDK := $(DEFAULT_APP_TARGET_SDK)
+endif
+$(R_file_stamp): PRIVATE_ASSET_DIR :=
+$(R_file_stamp): PRIVATE_PROGUARD_OPTIONS_FILE :=
+$(R_file_stamp): PRIVATE_MANIFEST_PACKAGE_NAME :=
+$(R_file_stamp): PRIVATE_MANIFEST_INSTRUMENTATION_FOR :=
+
+$(R_file_stamp) : $(all_resources) $(full_android_manifest) $(AAPT) $(framework_res_package_export_deps)
+ @echo "target R.java/Manifest.java: $(PRIVATE_MODULE) ($@)"
+ $(create-resource-java-files)
+ $(hide) find $(PRIVATE_SOURCE_INTERMEDIATES_DIR) -name R.java | xargs cat > $@
+
+$(LOCAL_BUILT_MODULE): $(R_file_stamp)
+ifneq ($(full_classes_jar),)
+$(full_classes_compiled_jar): $(R_file_stamp)
+endif
+
+endif # $(all_resources) not empty
+
LOCAL_IS_STATIC_JAVA_LIBRARY :=
+LOCAL_JAR_EXCLUDE_FILES :=
diff --git a/core/tasks/apicheck.mk b/core/tasks/apicheck.mk
index 96e0f44..8d9928e 100644
--- a/core/tasks/apicheck.mk
+++ b/core/tasks/apicheck.mk
@@ -17,7 +17,8 @@
# api compatibility or added apis illegally.
#
-ifneq ($(BUILD_TINY_ANDROID), true)
+# skip api check for TINY_ANDROID and PDK buid
+ifeq (,$(filter true, $(BUILD_TINY_ANDROID) $(TARGET_BUILD_PDK)))
.PHONY: checkapi
diff --git a/core/tasks/collect_gpl_sources.mk b/core/tasks/collect_gpl_sources.mk
new file mode 100644
index 0000000..3c7afcc
--- /dev/null
+++ b/core/tasks/collect_gpl_sources.mk
@@ -0,0 +1,30 @@
+# Copyright (C) 2011 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+gpl_source_tgz := $(call intermediates-dir-for,PACKAGING,gpl_source,HOST,COMMON)/gpl_source.tgz
+
+$(gpl_source_tgz): PRIVATE_PATHS := $(sort $(patsubst %/, %, $(dir $(ALL_GPL_MODULE_LICENSE_FILES))))
+$(gpl_source_tgz) : $(ALL_GPL_MODULE_LICENSE_FILES)
+ @echo Package gpl sources: $@
+ @rm -rf $(dir $@) && mkdir -p $(dir $@)
+ $(hide) tar cfz $@ --exclude ".git*" $(PRIVATE_PATHS)
+
+
+.PHONY: gpl_source_tgz
+gpl_source_tgz : $(gpl_source_tgz)
+
+# Dist the tgz only if we are doing a full build
+ifeq (,$(TARGET_BUILD_APPS))
+$(call dist-for-goals, droidcore, $(gpl_source_tgz))
+endif
diff --git a/core/tasks/cts.mk b/core/tasks/cts.mk
index 45dcd0f..4f624d8 100644
--- a/core/tasks/cts.mk
+++ b/core/tasks/cts.mk
@@ -25,6 +25,9 @@ CTS_TF_JAR := $(HOST_OUT_JAVA_LIBRARIES)/cts-tradefed.jar
CTS_TF_EXEC_PATH := $(HOST_OUT_EXECUTABLES)/cts-tradefed
CTS_TF_README_PATH := $(cts_tools_src_dir)/tradefed-host/README
+VMTESTSTF_INTERMEDIATES :=$(call intermediates-dir-for,EXECUTABLES,vm-tests-tf,1,)
+VMTESTSTF_JAR := $(VMTESTSTF_INTERMEDIATES)/android.core.vm-tests-tf.jar
+
CTS_CORE_CASE_LIST := \
android.core.tests.libcore.package.dalvik \
android.core.tests.libcore.package.com \
@@ -34,6 +37,10 @@ CTS_CORE_CASE_LIST := \
android.core.tests.libcore.package.libcore \
android.core.tests.runner
+# Depend on the full package paths rather than the phony targets to avoid
+# rebuilding the packages every time.
+CTS_CORE_CASES := $(foreach pkg,$(CTS_CORE_CASE_LIST),$(call intermediates-dir-for,APPS,$(pkg))/package.apk)
+
-include cts/CtsTestCaseList.mk
CTS_CASE_LIST := $(CTS_CORE_CASE_LIST) $(CTS_TEST_CASE_LIST)
@@ -41,8 +48,7 @@ DEFAULT_TEST_PLAN := $(cts_dir)/$(cts_name)/resource/plans
$(cts_dir)/all_cts_files_stamp: PRIVATE_JUNIT_HOST_JAR := $(junit_host_jar)
--include cts/CtsHostLibraryList.mk
-$(cts_dir)/all_cts_files_stamp: $(CTS_CASE_LIST) $(CTS_TEST_CASES) $(junit_host_jar) $(HOSTTESTLIB_JAR) $(CTS_HOST_LIBRARY_JARS) $(TF_JAR) $(CTS_TF_JAR) $(CTS_TF_EXEC_PATH) $(CTS_TF_README_PATH) $(ACP)
+$(cts_dir)/all_cts_files_stamp: $(CTS_CORE_CASES) $(CTS_TEST_CASES) $(CTS_TEST_CASE_LIST) $(junit_host_jar) $(HOSTTESTLIB_JAR) $(CTS_HOST_LIBRARY_JARS) $(TF_JAR) $(VMTESTSTF_JAR) $(CTS_TF_JAR) $(CTS_TF_EXEC_PATH) $(CTS_TF_README_PATH) $(ACP)
# Make necessary directory for CTS
$(hide) rm -rf $(PRIVATE_CTS_DIR)
$(hide) mkdir -p $(TMP_DIR)
@@ -51,6 +57,7 @@ $(cts_dir)/all_cts_files_stamp: $(CTS_CASE_LIST) $(CTS_TEST_CASES) $(junit_host_
$(hide) mkdir -p $(PRIVATE_DIR)/repository/testcases
$(hide) mkdir -p $(PRIVATE_DIR)/repository/plans
# Copy executable and JARs to CTS directory
+ $(hide) $(ACP) -fp $(VMTESTSTF_JAR) $(PRIVATE_DIR)/repository/testcases
$(hide) $(ACP) -fp $(DDMLIB_JAR) $(PRIVATE_JUNIT_HOST_JAR) $(HOSTTESTLIB_JAR) $(CTS_HOST_LIBRARY_JARS) $(TF_JAR) $(CTS_TF_JAR) $(CTS_TF_EXEC_PATH) $(CTS_TF_README_PATH) $(PRIVATE_DIR)/tools
# Change mode of the executables
$(foreach apk,$(CTS_CASE_LIST),$(call copy-testcase-apk,$(apk)))
@@ -81,96 +88,72 @@ CORETESTS_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-tests
GEN_CLASSPATH := $(CORE_INTERMEDIATES)/classes.jar:$(BOUNCYCASTLE_INTERMEDIATES)/classes.jar:$(APACHEXML_INTERMEDIATES)/classes.jar:$(JUNIT_INTERMEDIATES)/classes.jar:$(SQLITEJDBC_INTERMEDIATES)/javalib.jar:$(CORETESTS_INTERMEDIATES)/javalib.jar
-$(cts_dir)/all_cts_core_files_stamp: PRIVATE_CLASSPATH:=$(GEN_CLASSPATH)
+CTS_CORE_XMLS := \
+ $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.dalvik.xml \
+ $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.com.xml \
+ $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.sun.xml \
+ $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.tests.xml \
+ $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.org.xml \
+ $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.libcore.xml
+
+$(CTS_CORE_XMLS): PRIVATE_CLASSPATH:=$(GEN_CLASSPATH)
# Why does this depend on javalib.jar instead of classes.jar? Because
# even though the tool will operate on the classes.jar files, the
# build system requires that dependencies use javalib.jar. If
# javalib.jar is up-to-date, then classes.jar is as well. Depending
# on classes.jar will build the files incorrectly.
-$(cts_dir)/all_cts_core_files_stamp: $(CTS_CORE_CASE_LIST) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CORE_INTERMEDIATES)/javalib.jar $(BOUNCYCASTLE_INTERMEDIATES)/javalib.jar $(APACHEXML_INTERMEDIATES)/javalib.jar $(SQLITEJDBC_INTERMEDIATES)/javalib.jar $(JUNIT_INTERMEDIATES)/javalib.jar $(CORETESTS_INTERMEDIATES)/javalib.jar $(cts_dir)/all_cts_files_stamp | $(ACP)
- $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.libcore.package.dalvik,\
+$(CTS_CORE_XMLS): $(CTS_CORE_CASES) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CORE_INTERMEDIATES)/javalib.jar $(BOUNCYCASTLE_INTERMEDIATES)/javalib.jar $(APACHEXML_INTERMEDIATES)/javalib.jar $(SQLITEJDBC_INTERMEDIATES)/javalib.jar $(JUNIT_INTERMEDIATES)/javalib.jar $(CORETESTS_INTERMEDIATES)/javalib.jar | $(ACP)
+ $(hide) mkdir -p $(CTS_TESTCASES_OUT)
+ $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.dalvik,\
cts/tests/core/libcore/dalvik/AndroidManifest.xml,\
$(CORETESTS_INTERMEDIATES)/javalib.jar,dalvik,\
libcore/expectations)
- $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.libcore.package.com,\
+ $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.com,\
cts/tests/core/libcore/com/AndroidManifest.xml,\
$(CORETESTS_INTERMEDIATES)/javalib.jar,com,\
libcore/expectations)
- $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.libcore.package.sun,\
+ $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.sun,\
cts/tests/core/libcore/sun/AndroidManifest.xml,\
$(CORETESTS_INTERMEDIATES)/javalib.jar,sun,\
libcore/expectations)
- $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.libcore.package.tests,\
+ $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.tests,\
cts/tests/core/libcore/tests/AndroidManifest.xml,\
$(CORETESTS_INTERMEDIATES)/javalib.jar,tests,\
libcore/expectations)
- $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.libcore.package.org,\
+ $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.org,\
cts/tests/core/libcore/org/AndroidManifest.xml,\
$(CORETESTS_INTERMEDIATES)/javalib.jar,org,\
libcore/expectations)
- $(call generate-core-test-description,$(cts_dir)/$(cts_name)/repository/testcases/android.core.tests.libcore.package.libcore,\
+ $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.libcore,\
cts/tests/core/libcore/libcore/AndroidManifest.xml,\
$(CORETESTS_INTERMEDIATES)/javalib.jar,libcore,\
libcore/expectations)
- $(hide) touch $@
-
-
-# ----- Generate the test descriptions for the vm-tests -----
-# TODO: remove this section once cts-tf replaces cts.
-#
-CORE_VM_TEST_DESC := $(cts_dir)/$(cts_name)/repository/testcases/android.core.vm-tests
-
-VMTESTS_INTERMEDIATES :=$(call intermediates-dir-for,EXECUTABLES,vm-tests,1,)
-# core tests only needed to get hold of junit-framework-classes
-CORE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core,,COMMON)
-JUNIT_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-junit,,COMMON)
-
-GEN_CLASSPATH := $(CORE_INTERMEDIATES)/classes.jar:$(JUNIT_INTERMEDIATES)/classes.jar:$(VMTESTS_INTERMEDIATES)/android.core.vm-tests.jar:$(HOSTTESTLIB_JAR):$(DDMLIB_JAR)
-
-$(CORE_VM_TEST_DESC): PRIVATE_CLASSPATH:=$(GEN_CLASSPATH)
-# Please see big comment above on why this line depends on javalib.jar instead of classes.jar
-$(CORE_VM_TEST_DESC): vm-tests $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CORE_INTERMEDIATES)/javalib.jar $(JUNIT_INTERMEDIATES)/javalib.jar $(VMTESTS_INTERMEDIATES)/android.core.vm-tests.jar $(HOSTTESTLIB_JAR) $(DDMLIB_JAR) $(cts_dir)/all_cts_files_stamp | $(ACP)
- $(call generate-core-test-description,$(CORE_VM_TEST_DESC),\
- cts/tests/vm-tests/AndroidManifest.xml,\
- $(VMTESTS_INTERMEDIATES)/android.core.vm-tests.jar,"",\
- libcore/expectations,\
- cts/tools/vm-tests/Android.mk)
- $(ACP) -fv $(VMTESTS_INTERMEDIATES)/android.core.vm-tests.jar $(PRIVATE_DIR)/repository/testcases/android.core.vm-tests.jar
# ----- Generate the test descriptions for the vm-tests-tf -----
#
-CORE_VM_TEST_TF_DESC := $(cts_dir)/$(cts_name)/repository/testcases/android.core.vm-tests-tf
+CORE_VM_TEST_TF_DESC := $(CTS_TESTCASES_OUT)/android.core.vm-tests-tf.xml
-VMTESTSTF_INTERMEDIATES :=$(call intermediates-dir-for,EXECUTABLES,vm-tests-tf,1,)
# core tests only needed to get hold of junit-framework-classes
CORE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core,,COMMON)
JUNIT_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-junit,,COMMON)
-GEN_CLASSPATH := $(CORE_INTERMEDIATES)/classes.jar:$(JUNIT_INTERMEDIATES)/classes.jar:$(VMTESTSTF_INTERMEDIATES)/android.core.vm-tests-tf.jar:$(DDMLIB_JAR):$(TF_JAR)
+GEN_CLASSPATH := $(CORE_INTERMEDIATES)/classes.jar:$(JUNIT_INTERMEDIATES)/classes.jar:$(VMTESTSTF_JAR):$(DDMLIB_JAR):$(TF_JAR)
$(CORE_VM_TEST_TF_DESC): PRIVATE_CLASSPATH:=$(GEN_CLASSPATH)
# Please see big comment above on why this line depends on javalib.jar instead of classes.jar
-$(CORE_VM_TEST_TF_DESC): $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CORE_INTERMEDIATES)/javalib.jar $(JUNIT_INTERMEDIATES)/javalib.jar $(VMTESTSTF_INTERMEDIATES)/android.core.vm-tests-tf.jar $(DDMLIB_JAR) $(cts_dir)/all_cts_files_stamp | $(ACP)
- $(call generate-core-test-description,$(CORE_VM_TEST_TF_DESC),\
+$(CORE_VM_TEST_TF_DESC): $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CORE_INTERMEDIATES)/javalib.jar $(JUNIT_INTERMEDIATES)/javalib.jar $(VMTESTSTF_JAR) $(DDMLIB_JAR) | $(ACP)
+ $(hide) mkdir -p $(CTS_TESTCASES_OUT)
+ $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.vm-tests-tf,\
cts/tests/vm-tests-tf/AndroidManifest.xml,\
- $(VMTESTSTF_INTERMEDIATES)/android.core.vm-tests-tf.jar,"",\
+ $(VMTESTSTF_JAR),"",\
libcore/expectations,\
cts/tools/vm-tests-tf/Android.mk)
- $(ACP) -fv $(VMTESTSTF_INTERMEDIATES)/android.core.vm-tests-tf.jar $(PRIVATE_DIR)/repository/testcases/android.core.vm-tests-tf.jar
-
-
-# Move app security host-side tests to the repository
-APP_SECURITY_LIB := $(cts_dir)/$(cts_name)/repository/testcases/CtsAppSecurityTests.jar
-
-$(APP_SECURITY_LIB): $(HOST_OUT_JAVA_LIBRARIES)/CtsAppSecurityTests.jar $(cts_dir)/all_cts_files_stamp $(ACP)
- $(ACP) -fv $(HOST_OUT_JAVA_LIBRARIES)/CtsAppSecurityTests.jar $(APP_SECURITY_LIB)
-
# Generate the default test plan for User.
# Usage: buildCts.py <testRoot> <ctsOutputDir> <tempDir> <androidRootDir> <docletPath>
-$(DEFAULT_TEST_PLAN): $(cts_dir)/all_cts_files_stamp $(cts_dir)/all_cts_core_files_stamp $(cts_tools_src_dir)/utils/buildCts.py $(CORE_VM_TEST_TF_DESC) $(CORE_VM_TEST_DESC) $(APP_SECURITY_LIB) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CTS_TEST_XMLS) | $(ACP)
- $(hide) $(ACP) -fp $(CTS_TEST_XMLS) $(PRIVATE_DIR)/repository/testcases
+$(DEFAULT_TEST_PLAN): $(cts_dir)/all_cts_files_stamp $(cts_tools_src_dir)/utils/buildCts.py $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CTS_CORE_XMLS) $(CTS_TEST_XMLS) $(CORE_VM_TEST_TF_DESC) | $(ACP)
+ $(hide) $(ACP) -fp $(CTS_CORE_XMLS) $(CTS_TEST_XMLS) $(CORE_VM_TEST_TF_DESC) $(PRIVATE_DIR)/repository/testcases
$(hide) $(cts_tools_src_dir)/utils/buildCts.py cts/tests/tests/ $(PRIVATE_DIR) $(TMP_DIR) \
$(TOP) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar
@@ -183,7 +166,7 @@ $(INTERNAL_CTS_TARGET): PRIVATE_NAME := $(cts_name)
$(INTERNAL_CTS_TARGET): PRIVATE_CTS_DIR := $(cts_dir)
$(INTERNAL_CTS_TARGET): PRIVATE_DIR := $(cts_dir)/$(cts_name)
$(INTERNAL_CTS_TARGET): TMP_DIR := $(cts_dir)/temp
-$(INTERNAL_CTS_TARGET): $(cts_dir)/all_cts_files_stamp $(DEFAULT_TEST_PLAN) $(CORE_VM_TEST_DESC)
+$(INTERNAL_CTS_TARGET): $(cts_dir)/all_cts_files_stamp $(DEFAULT_TEST_PLAN)
$(hide) echo "Package CTS: $@"
$(hide) cd $(dir $@) && zip -rq $(notdir $@) $(PRIVATE_NAME)
diff --git a/core/tasks/vendor_module_check.mk b/core/tasks/vendor_module_check.mk
new file mode 100644
index 0000000..ca0ad8d
--- /dev/null
+++ b/core/tasks/vendor_module_check.mk
@@ -0,0 +1,80 @@
+#
+# Copyright (C) 2011 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Restrict the vendor module owners here.
+_vendor_owner_whitelist := \
+ broadcom \
+ csr \
+ imgtec \
+ invensense \
+ nxp \
+ samsung \
+ samsung_arm \
+ ti
+
+
+ifneq (,$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_RESTRICT_VENDOR_FILES))
+
+_check_modules := $(sort $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES))
+
+# expand with the required modules
+# $(1) the module name set to expand
+define _expand_required_modules
+$(eval _erm_new_modules:=)\
+$(foreach m, $(1), $(eval r:=$(ALL_MODULES.$(m).REQUIRED))\
+ $(if $(r), $(if $(filter $(_check_modules), $(r)),,\
+ $(eval _check_modules := $(_check_modules) $(r))\
+ $(eval _erm_new_modules := $(_erm_new_modules) $(r)))))\
+$(if $(_erm_new_modules), $(call _expand_required_modules, $(_erm_new_modules)))
+endef
+
+$(call _expand_required_modules, $(_check_modules))
+
+
+# Restrict owners
+ifneq (,$(filter true owner all, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_RESTRICT_VENDOR_FILES)))
+
+ifneq (,$(filter vendor/%, $(PRODUCT_PACKAGE_OVERLAYS) $(DEVICE_PACKAGE_OVERLAYS)))
+$(error Error: Product "$(TARGET_PRODUCT)" can not have overlay in vendor tree: \
+ $(filter vendor/%, $(PRODUCT_PACKAGE_OVERLAYS) $(DEVICE_PACKAGE_OVERLAYS)))
+endif
+ifneq (,$(filter vendor/%, $(PRODUCT_COPY_FILES)))
+$(error Error: Product "$(TARGET_PRODUCT)" can not have PRODUCT_COPY_FILES from vendor tree: \
+ $(filter vendor/%, $(PRODUCT_COPY_FILES)))
+endif
+
+$(foreach m, $(_check_modules), \
+ $(if $(filter vendor/%, $(ALL_MODULES.$(m).PATH)),\
+ $(if $(filter $(_vendor_owner_whitelist), $(ALL_MODULES.$(m).OWNER)),,\
+ $(error Error: vendor module "$(m)" in $(ALL_MODULES.$(m).PATH) with unknown owner \
+ "$(ALL_MODULES.$(m).OWNER)" in product "$(TARGET_PRODUCT)"))))
+
+endif
+
+
+# Restrict paths
+ifneq (,$(filter path all, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_RESTRICT_VENDOR_FILES)))
+
+$(foreach m, $(_check_modules), \
+ $(if $(filter vendor/%, $(ALL_MODULES.$(m).PATH)),\
+ $(if $(filter $(TARGET_OUT_VENDOR)/%, $(ALL_MODULES.$(m).INSTALLED)),,\
+ $(error Error: vendor module "$(m)" in $(ALL_MODULES.$(m).PATH) \
+ in product "$(TARGET_PRODUCT)" being installed to \
+ $(ALL_MODULES.$(m).INSTALLED) which is not in the vendor tree))))
+
+endif
+
+endif
diff --git a/core/user_tags.mk b/core/user_tags.mk
index 2e7017e..325c600 100644
--- a/core/user_tags.mk
+++ b/core/user_tags.mk
@@ -50,7 +50,6 @@ GRANDFATHERED_USER_MODULES += \
applypatch \
app_process \
archquery \
- asm-3.1 \
atree \
audio \
badblocks \
@@ -72,6 +71,7 @@ GRANDFATHERED_USER_MODULES += \
com.android.phone.common \
com.android.vcard \
commons-compress-1.0 \
+ content \
copybit.qsd8k \
copybit.s5pc110 \
coverage \
@@ -164,14 +164,12 @@ GRANDFATHERED_USER_MODULES += \
jsr305lib \
junit \
jython \
- keystore \
kxml2-2.3.0 \
launch-wrapper \
layoutlib \
layoutlib_api \
layoutlib_create \
layoutlib_utils \
- layoutopt \
liba2dp \
libabi \
libandroid \
@@ -472,7 +470,6 @@ GRANDFATHERED_USER_MODULES += \
sig-create \
signapk \
signature-tools \
- simg2img \
spec-progress \
sqlite3 \
stack_dump \
@@ -494,7 +491,6 @@ GRANDFATHERED_USER_MODULES += \
traceview \
tune2fs \
tune2fs_host \
- uix \
usbtest \
vdc \
vm-tests \
diff --git a/core/version_defaults.mk b/core/version_defaults.mk
index bff8ef9..c97306c 100644
--- a/core/version_defaults.mk
+++ b/core/version_defaults.mk
@@ -41,7 +41,7 @@ ifeq "" "$(PLATFORM_VERSION)"
# which is the version that we reveal to the end user.
# Update this value when the platform version changes (rather
# than overriding it somewhere else). Can be an arbitrary string.
- PLATFORM_VERSION := 4.0.4
+ PLATFORM_VERSION := JellyBean
endif
ifeq "" "$(PLATFORM_SDK_VERSION)"
@@ -59,7 +59,7 @@ endif
ifeq "" "$(PLATFORM_VERSION_CODENAME)"
# This is the current development code-name, if the build is not a final
# release build. If this is a final release build, it is simply "REL".
- PLATFORM_VERSION_CODENAME := REL
+ PLATFORM_VERSION_CODENAME := JellyBean
endif
ifeq "" "$(DEFAULT_APP_TARGET_SDK)"