aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/Makefile2
-rw-r--r--core/app_certificate_validate.mk12
-rw-r--r--core/binary.mk280
-rw-r--r--core/combo/HOST_linux-x86.mk2
-rw-r--r--core/combo/TARGET_linux-arm.mk4
-rw-r--r--core/config.mk1
-rw-r--r--core/definitions.mk3
-rw-r--r--core/dex_preopt_config.mk5
-rw-r--r--core/dex_preopt_libart_boot.mk1
-rw-r--r--core/envsetup.mk2
-rw-r--r--core/goma.mk11
-rw-r--r--core/jacoco.mk2
-rw-r--r--core/main.mk12
-rw-r--r--core/package_internal.mk5
-rw-r--r--core/pdk_config.mk1
-rw-r--r--core/prebuilt_internal.mk2
-rw-r--r--core/product.mk2
-rw-r--r--core/product_config.mk5
-rw-r--r--core/python_binary_host_test_config_template.xml21
-rw-r--r--core/soong_app_prebuilt.mk25
-rw-r--r--core/soong_config.mk8
-rw-r--r--core/soong_java_prebuilt.mk5
-rw-r--r--core/tasks/module-info.mk2
23 files changed, 245 insertions, 168 deletions
diff --git a/core/Makefile b/core/Makefile
index c63e2137e..7d1c7ff20 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -3124,7 +3124,7 @@ define check-sum-of-partition-sizes
3124 else \ 3124 else \
3125 echo "The sum of sizes of [$(strip $(3))] is within $(strip $(1)):"; \ 3125 echo "The sum of sizes of [$(strip $(3))] is within $(strip $(1)):"; \
3126 echo $${sum_sizes_expr} '==' $$(( $${sum_sizes_expr} )) '<=' "$(2)" '==' $$(( $(2) )); \ 3126 echo $${sum_sizes_expr} '==' $$(( $${sum_sizes_expr} )) '<=' "$(2)" '==' $$(( $(2) )); \
3127 fi 3127 fi;
3128endef 3128endef
3129 3129
3130define check-all-partition-sizes-target 3130define check-all-partition-sizes-target
diff --git a/core/app_certificate_validate.mk b/core/app_certificate_validate.mk
new file mode 100644
index 000000000..15ddd9450
--- /dev/null
+++ b/core/app_certificate_validate.mk
@@ -0,0 +1,12 @@
1
2ifeq (true,$(filter true, \
3 $(LOCAL_PRODUCT_MODULE) $(LOCAL_PRODUCT_SERVICES_MODULE) \
4 $(LOCAL_VENDOR_MODULE) $(LOCAL_PROPRIETARY_MODULE)))
5 ifneq (,$(filter $(dir $(DEFAULT_SYSTEM_DEV_CERTIFICATE))%,$(LOCAL_CERTIFICATE)))
6 CERTIFICATE_VIOLATION_MODULES += $(LOCAL_MODULE)
7 ifeq (true,$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ENFORCE_ARTIFACT_SYSTEM_CERTIFICATE_REQUIREMENT))
8 $(if $(filter $(LOCAL_MODULE),$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ARTIFACT_SYSTEM_CERTIFICATE_REQUIREMENT_WHITELIST)),,\
9 $(call pretty-error,The module in product partition cannot be signed with certificate in system.))
10 endif
11 endif
12endif \ No newline at end of file
diff --git a/core/binary.mk b/core/binary.mk
index e7b0c52d6..df0e1a501 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -72,8 +72,11 @@ endif
72else 72else
73 my_native_coverage := false 73 my_native_coverage := false
74endif 74endif
75ifneq ($(NATIVE_COVERAGE),true)
76 my_native_coverage := false
77endif
75 78
76ifeq ($(strip $(ENABLE_XOM)),true) 79ifneq ($(strip $(ENABLE_XOM)),false)
77 ifndef LOCAL_IS_HOST_MODULE 80 ifndef LOCAL_IS_HOST_MODULE
78 my_xom := true 81 my_xom := true
79 # Disable XOM in excluded paths. 82 # Disable XOM in excluded paths.
@@ -470,144 +473,6 @@ endif
470my_asflags += -D__ASSEMBLY__ 473my_asflags += -D__ASSEMBLY__
471 474
472########################################################### 475###########################################################
473## Define PRIVATE_ variables from global vars
474###########################################################
475ifndef LOCAL_IS_HOST_MODULE
476ifdef LOCAL_USE_VNDK
477my_target_global_c_includes := \
478 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)PROJECT_INCLUDES)
479my_target_global_c_system_includes := \
480 $(TARGET_OUT_HEADERS) \
481 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)PROJECT_SYSTEM_INCLUDES)
482else ifdef LOCAL_SDK_VERSION
483my_target_global_c_includes :=
484my_target_global_c_system_includes := $(my_ndk_stl_include_path) $(my_ndk_sysroot_include)
485else ifdef BOARD_VNDK_VERSION
486my_target_global_c_includes := $(SRC_HEADERS) \
487 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)PROJECT_INCLUDES) \
488 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)C_INCLUDES)
489my_target_global_c_system_includes := $(SRC_SYSTEM_HEADERS) \
490 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)PROJECT_SYSTEM_INCLUDES) \
491 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)C_SYSTEM_INCLUDES)
492else
493my_target_global_c_includes := $(SRC_HEADERS) \
494 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)PROJECT_INCLUDES) \
495 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)C_INCLUDES)
496my_target_global_c_system_includes := $(SRC_SYSTEM_HEADERS) $(TARGET_OUT_HEADERS) \
497 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)PROJECT_SYSTEM_INCLUDES) \
498 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)C_SYSTEM_INCLUDES)
499endif
500
501my_target_global_cflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CFLAGS)
502my_target_global_conlyflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CONLYFLAGS) $(my_c_std_conlyflags)
503my_target_global_cppflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CPPFLAGS) $(my_cpp_std_cppflags)
504ifeq ($(my_use_clang_lld),true)
505 my_target_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_LLDFLAGS)
506 include $(BUILD_SYSTEM)/pack_dyn_relocs_setup.mk
507 ifeq ($(my_pack_module_relocations),false)
508 my_target_global_ldflags += -Wl,--pack-dyn-relocs=none
509 endif
510else
511 my_target_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_LDFLAGS)
512endif # my_use_clang_lld
513
514$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_GLOBAL_C_INCLUDES := $(my_target_global_c_includes)
515$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_GLOBAL_C_SYSTEM_INCLUDES := $(my_target_global_c_system_includes)
516$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_GLOBAL_CFLAGS := $(my_target_global_cflags)
517$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_GLOBAL_CONLYFLAGS := $(my_target_global_conlyflags)
518$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_GLOBAL_CPPFLAGS := $(my_target_global_cppflags)
519$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_GLOBAL_LDFLAGS := $(my_target_global_ldflags)
520
521else # LOCAL_IS_HOST_MODULE
522
523my_host_global_c_includes := $(SRC_HEADERS) \
524 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)C_INCLUDES)
525my_host_global_c_system_includes := $(SRC_SYSTEM_HEADERS) \
526 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)C_SYSTEM_INCLUDES)
527
528my_host_global_cflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CFLAGS)
529my_host_global_conlyflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CONLYFLAGS) $(my_c_std_conlyflags)
530my_host_global_cppflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CPPFLAGS) $(my_cpp_std_cppflags)
531ifeq ($(my_use_clang_lld),true)
532 my_host_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_LLDFLAGS)
533else
534 my_host_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_LDFLAGS)
535endif # my_use_clang_lld
536
537$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_GLOBAL_C_INCLUDES := $(my_host_global_c_includes)
538$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_GLOBAL_C_SYSTEM_INCLUDES := $(my_host_global_c_system_includes)
539$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_HOST_GLOBAL_CFLAGS := $(my_host_global_cflags)
540$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_HOST_GLOBAL_CONLYFLAGS := $(my_host_global_conlyflags)
541$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_HOST_GLOBAL_CPPFLAGS := $(my_host_global_cppflags)
542$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_HOST_GLOBAL_LDFLAGS := $(my_host_global_ldflags)
543endif # LOCAL_IS_HOST_MODULE
544
545# To enable coverage for a given module, set LOCAL_NATIVE_COVERAGE=true and
546# build with NATIVE_COVERAGE=true in your enviornment. Note that the build
547# system is not sensitive to changes to NATIVE_COVERAGE, so you should do a
548# clean build of your module after toggling it.
549ifeq ($(NATIVE_COVERAGE),true)
550 ifeq ($(my_native_coverage),true)
551 # Note that clang coverage doesn't play nicely with acov out of the box.
552 # Clang apparently generates .gcno files that aren't compatible with
553 # gcov-4.8. This can be solved by installing gcc-4.6 and invoking lcov
554 # with `--gcov-tool /usr/bin/gcov-4.6`.
555 #
556 # http://stackoverflow.com/questions/17758126/clang-code-coverage-invalid-output
557 my_cflags += --coverage -O0
558 my_ldflags += --coverage
559 endif
560
561 my_coverage_lib := $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)LIBPROFILE_RT)
562
563 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_COVERAGE_LIB := $(my_coverage_lib)
564 $(LOCAL_INTERMEDIATE_TARGETS): $(my_coverage_lib)
565else
566 my_native_coverage := false
567endif
568
569###########################################################
570## Define PRIVATE_ variables used by multiple module types
571###########################################################
572$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_NO_DEFAULT_COMPILER_FLAGS := \
573 $(strip $(LOCAL_NO_DEFAULT_COMPILER_FLAGS))
574
575ifeq ($(strip $(WITH_STATIC_ANALYZER)),)
576 LOCAL_NO_STATIC_ANALYZER := true
577endif
578
579ifneq ($(strip $(LOCAL_IS_HOST_MODULE)),)
580 my_syntax_arch := host
581else
582 my_syntax_arch := $($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)
583endif
584
585ifeq ($(strip $(my_cc)),)
586 my_cc := $(my_cc_wrapper) $(CLANG)
587endif
588
589SYNTAX_TOOLS_PREFIX := \
590 $(LLVM_PREBUILTS_BASE)/$(BUILD_OS)-x86/$(LLVM_PREBUILTS_VERSION)/libexec
591
592ifneq ($(LOCAL_NO_STATIC_ANALYZER),true)
593 my_cc := CCC_CC=$(CLANG) CLANG=$(CLANG) \
594 $(SYNTAX_TOOLS_PREFIX)/ccc-analyzer
595endif
596
597$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CC := $(my_cc)
598
599ifeq ($(strip $(my_cxx)),)
600 my_cxx := $(my_cxx_wrapper) $(CLANG_CXX)
601endif
602
603ifneq ($(LOCAL_NO_STATIC_ANALYZER),true)
604 my_cxx := CCC_CXX=$(CLANG_CXX) CLANG_CXX=$(CLANG_CXX) \
605 $(SYNTAX_TOOLS_PREFIX)/c++-analyzer
606endif
607
608$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_LINKER := $(my_linker)
609$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CXX := $(my_cxx)
610
611# TODO: support a mix of standard extensions so that this isn't necessary 476# TODO: support a mix of standard extensions so that this isn't necessary
612LOCAL_CPP_EXTENSION := $(strip $(LOCAL_CPP_EXTENSION)) 477LOCAL_CPP_EXTENSION := $(strip $(LOCAL_CPP_EXTENSION))
613ifeq ($(LOCAL_CPP_EXTENSION),) 478ifeq ($(LOCAL_CPP_EXTENSION),)
@@ -1443,6 +1308,8 @@ normal_objects += $(addprefix $(TOPDIR)$(LOCAL_PATH)/,$(LOCAL_PREBUILT_OBJ_FILES
1443 1308
1444all_objects := $(normal_objects) $(gen_o_objects) 1309all_objects := $(normal_objects) $(gen_o_objects)
1445 1310
1311LOCAL_INTERMEDIATE_TARGETS += $(all_objects)
1312
1446# Cleanup file tracking 1313# Cleanup file tracking
1447$(foreach f,$(my_tracked_gen_files),$(eval my_src_file_gen_$(s):=)) 1314$(foreach f,$(my_tracked_gen_files),$(eval my_src_file_gen_$(s):=))
1448my_tracked_gen_files := 1315my_tracked_gen_files :=
@@ -1736,6 +1603,141 @@ endif
1736# (start-group/end-group), so append after the check above. 1603# (start-group/end-group), so append after the check above.
1737my_ldlibs += $(my_cxx_ldlibs) 1604my_ldlibs += $(my_cxx_ldlibs)
1738 1605
1606###########################################################
1607## Define PRIVATE_ variables from global vars
1608###########################################################
1609ifndef LOCAL_IS_HOST_MODULE
1610ifdef LOCAL_USE_VNDK
1611my_target_global_c_includes := \
1612 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)PROJECT_INCLUDES)
1613my_target_global_c_system_includes := \
1614 $(TARGET_OUT_HEADERS) \
1615 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)PROJECT_SYSTEM_INCLUDES)
1616else ifdef LOCAL_SDK_VERSION
1617my_target_global_c_includes :=
1618my_target_global_c_system_includes := $(my_ndk_stl_include_path) $(my_ndk_sysroot_include)
1619else ifdef BOARD_VNDK_VERSION
1620my_target_global_c_includes := $(SRC_HEADERS) \
1621 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)PROJECT_INCLUDES) \
1622 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)C_INCLUDES)
1623my_target_global_c_system_includes := $(SRC_SYSTEM_HEADERS) \
1624 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)PROJECT_SYSTEM_INCLUDES) \
1625 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)C_SYSTEM_INCLUDES)
1626else
1627my_target_global_c_includes := $(SRC_HEADERS) \
1628 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)PROJECT_INCLUDES) \
1629 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)C_INCLUDES)
1630my_target_global_c_system_includes := $(SRC_SYSTEM_HEADERS) $(TARGET_OUT_HEADERS) \
1631 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)PROJECT_SYSTEM_INCLUDES) \
1632 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)C_SYSTEM_INCLUDES)
1633endif
1634
1635my_target_global_cflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CFLAGS)
1636my_target_global_conlyflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CONLYFLAGS) $(my_c_std_conlyflags)
1637my_target_global_cppflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CPPFLAGS) $(my_cpp_std_cppflags)
1638ifeq ($(my_use_clang_lld),true)
1639 my_target_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_LLDFLAGS)
1640 include $(BUILD_SYSTEM)/pack_dyn_relocs_setup.mk
1641 ifeq ($(my_pack_module_relocations),false)
1642 my_target_global_ldflags += -Wl,--pack-dyn-relocs=none
1643 endif
1644else
1645 my_target_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_LDFLAGS)
1646endif # my_use_clang_lld
1647
1648$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_GLOBAL_C_INCLUDES := $(my_target_global_c_includes)
1649$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_GLOBAL_C_SYSTEM_INCLUDES := $(my_target_global_c_system_includes)
1650$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_GLOBAL_CFLAGS := $(my_target_global_cflags)
1651$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_GLOBAL_CONLYFLAGS := $(my_target_global_conlyflags)
1652$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_GLOBAL_CPPFLAGS := $(my_target_global_cppflags)
1653$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_GLOBAL_LDFLAGS := $(my_target_global_ldflags)
1654
1655else # LOCAL_IS_HOST_MODULE
1656
1657my_host_global_c_includes := $(SRC_HEADERS) \
1658 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)C_INCLUDES)
1659my_host_global_c_system_includes := $(SRC_SYSTEM_HEADERS) \
1660 $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)C_SYSTEM_INCLUDES)
1661
1662my_host_global_cflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CFLAGS)
1663my_host_global_conlyflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CONLYFLAGS) $(my_c_std_conlyflags)
1664my_host_global_cppflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CPPFLAGS) $(my_cpp_std_cppflags)
1665ifeq ($(my_use_clang_lld),true)
1666 my_host_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_LLDFLAGS)
1667else
1668 my_host_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_LDFLAGS)
1669endif # my_use_clang_lld
1670
1671$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_GLOBAL_C_INCLUDES := $(my_host_global_c_includes)
1672$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_GLOBAL_C_SYSTEM_INCLUDES := $(my_host_global_c_system_includes)
1673$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_HOST_GLOBAL_CFLAGS := $(my_host_global_cflags)
1674$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_HOST_GLOBAL_CONLYFLAGS := $(my_host_global_conlyflags)
1675$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_HOST_GLOBAL_CPPFLAGS := $(my_host_global_cppflags)
1676$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_HOST_GLOBAL_LDFLAGS := $(my_host_global_ldflags)
1677endif # LOCAL_IS_HOST_MODULE
1678
1679# To enable coverage for a given module, set LOCAL_NATIVE_COVERAGE=true and
1680# build with NATIVE_COVERAGE=true in your enviornment.
1681ifeq ($(NATIVE_COVERAGE),true)
1682 ifeq ($(my_native_coverage),true)
1683 # Note that clang coverage doesn't play nicely with acov out of the box.
1684 # Clang apparently generates .gcno files that aren't compatible with
1685 # gcov-4.8. This can be solved by installing gcc-4.6 and invoking lcov
1686 # with `--gcov-tool /usr/bin/gcov-4.6`.
1687 #
1688 # http://stackoverflow.com/questions/17758126/clang-code-coverage-invalid-output
1689 my_cflags += --coverage -O0
1690 my_ldflags += --coverage
1691 endif
1692
1693 my_coverage_lib := $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)LIBPROFILE_RT)
1694
1695 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_COVERAGE_LIB := $(my_coverage_lib)
1696 $(LOCAL_INTERMEDIATE_TARGETS): $(my_coverage_lib)
1697endif
1698
1699###########################################################
1700## Define PRIVATE_ variables used by multiple module types
1701###########################################################
1702$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_NO_DEFAULT_COMPILER_FLAGS := \
1703 $(strip $(LOCAL_NO_DEFAULT_COMPILER_FLAGS))
1704
1705ifeq ($(strip $(WITH_STATIC_ANALYZER)),)
1706 LOCAL_NO_STATIC_ANALYZER := true
1707endif
1708
1709ifneq ($(strip $(LOCAL_IS_HOST_MODULE)),)
1710 my_syntax_arch := host
1711else
1712 my_syntax_arch := $($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)
1713endif
1714
1715ifeq ($(strip $(my_cc)),)
1716 my_cc := $(my_cc_wrapper) $(CLANG)
1717endif
1718
1719SYNTAX_TOOLS_PREFIX := \
1720 $(LLVM_PREBUILTS_BASE)/$(BUILD_OS)-x86/$(LLVM_PREBUILTS_VERSION)/libexec
1721
1722ifneq ($(LOCAL_NO_STATIC_ANALYZER),true)
1723 my_cc := CCC_CC=$(CLANG) CLANG=$(CLANG) \
1724 $(SYNTAX_TOOLS_PREFIX)/ccc-analyzer
1725endif
1726
1727$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CC := $(my_cc)
1728
1729ifeq ($(strip $(my_cxx)),)
1730 my_cxx := $(my_cxx_wrapper) $(CLANG_CXX)
1731endif
1732
1733ifneq ($(LOCAL_NO_STATIC_ANALYZER),true)
1734 my_cxx := CCC_CXX=$(CLANG_CXX) CLANG_CXX=$(CLANG_CXX) \
1735 $(SYNTAX_TOOLS_PREFIX)/c++-analyzer
1736endif
1737
1738$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_LINKER := $(my_linker)
1739$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CXX := $(my_cxx)
1740
1739$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_YACCFLAGS := $(LOCAL_YACCFLAGS) 1741$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_YACCFLAGS := $(LOCAL_YACCFLAGS)
1740$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_ASFLAGS := $(my_asflags) 1742$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_ASFLAGS := $(my_asflags)
1741$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CONLYFLAGS := $(my_conlyflags) 1743$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CONLYFLAGS := $(my_conlyflags)
diff --git a/core/combo/HOST_linux-x86.mk b/core/combo/HOST_linux-x86.mk
index 4e83dc4c0..deed943a6 100644
--- a/core/combo/HOST_linux-x86.mk
+++ b/core/combo/HOST_linux-x86.mk
@@ -26,5 +26,5 @@ endef
26 26
27# $(1): The file to check 27# $(1): The file to check
28define get-file-size 28define get-file-size
29stat --format "%s" "$(1)" | tr -d '\n' 29stat -c "%s" "$(1)" | tr -d '\n'
30endef 30endef
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk
index c31906a0a..9514edb29 100644
--- a/core/combo/TARGET_linux-arm.mk
+++ b/core/combo/TARGET_linux-arm.mk
@@ -34,9 +34,9 @@ TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT := generic
34endif 34endif
35 35
36KNOWN_ARMv8_CORES := cortex-a53 cortex-a53.a57 cortex-a55 cortex-a73 cortex-a75 cortex-a76 36KNOWN_ARMv8_CORES := cortex-a53 cortex-a53.a57 cortex-a55 cortex-a73 cortex-a75 cortex-a76
37KNOWN_ARMv8_CORES += kryo exynos-m1 exynos-m2 37KNOWN_ARMv8_CORES += kryo kryo385 exynos-m1 exynos-m2
38 38
39KNOWN_ARMv82a_CORES := cortex-a55 cortex-a75 39KNOWN_ARMv82a_CORES := cortex-a55 cortex-a75 kryo385
40 40
41# Check for cores that implement armv8-2a ISAs. 41# Check for cores that implement armv8-2a ISAs.
42ifneq (,$(filter $(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT), $(KNOWN_ARMv82a_CORES))) 42ifneq (,$(filter $(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT), $(KNOWN_ARMv82a_CORES)))
diff --git a/core/config.mk b/core/config.mk
index c0a159dce..a3be19441 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -90,6 +90,7 @@ $(KATI_obsolete_var \
90 GLOBAL_CFLAGS_NO_OVERRIDE GLOBAL_CPPFLAGS_NO_OVERRIDE \ 90 GLOBAL_CFLAGS_NO_OVERRIDE GLOBAL_CPPFLAGS_NO_OVERRIDE \
91 ,GCC support has been removed. Use Clang instead) 91 ,GCC support has been removed. Use Clang instead)
92$(KATI_obsolete_var DIST_DIR dist_goal,Use dist-for-goals instead. See $(CHANGES_URL)#dist) 92$(KATI_obsolete_var DIST_DIR dist_goal,Use dist-for-goals instead. See $(CHANGES_URL)#dist)
93$(KATI_deprecated_var USER,Use BUILD_USERNAME instead. See $(CHANGES_URL)#USER)
93 94
94# This is marked as obsolete in envsetup.mk after reading the BoardConfig.mk 95# This is marked as obsolete in envsetup.mk after reading the BoardConfig.mk
95$(KATI_deprecate_export It is a global setting. See $(CHANGES_URL)#export_keyword) 96$(KATI_deprecate_export It is a global setting. See $(CHANGES_URL)#export_keyword)
diff --git a/core/definitions.mk b/core/definitions.mk
index a9807f110..d5c7b9113 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -77,6 +77,9 @@ ALL_FINDBUGS_FILES:=
77# GPL module license files 77# GPL module license files
78ALL_GPL_MODULE_LICENSE_FILES:= 78ALL_GPL_MODULE_LICENSE_FILES:=
79 79
80# Packages with certificate violation
81CERTIFICATE_VIOLATION_MODULES :=
82
80# Target and host installed module's dependencies on shared libraries. 83# Target and host installed module's dependencies on shared libraries.
81# They are list of "<module_name>:<installed_file>:lib1,lib2...". 84# They are list of "<module_name>:<installed_file>:lib1,lib2...".
82TARGET_DEPENDENCIES_ON_SHARED_LIBRARIES := 85TARGET_DEPENDENCIES_ON_SHARED_LIBRARIES :=
diff --git a/core/dex_preopt_config.mk b/core/dex_preopt_config.mk
index 0793516b2..3eaf55bb3 100644
--- a/core/dex_preopt_config.mk
+++ b/core/dex_preopt_config.mk
@@ -1,8 +1,8 @@
1DEX_PREOPT_CONFIG := $(PRODUCT_OUT)/dexpreopt.config 1DEX_PREOPT_CONFIG := $(PRODUCT_OUT)/dexpreopt.config
2 2
3# list of boot classpath jars for dexpreopt 3# list of boot classpath jars for dexpreopt
4DEXPREOPT_BOOT_JARS_MODULES := $(PRODUCT_BOOT_JARS) 4DEXPREOPT_BOOT_JARS_MODULES := $(strip $(filter-out conscrypt,$(PRODUCT_BOOT_JARS)))
5PRODUCT_BOOTCLASSPATH_JARS := $(strip $(DEXPREOPT_BOOT_JARS_MODULES)) 5PRODUCT_BOOTCLASSPATH_JARS := $(strip $(DEXPREOPT_BOOT_JARS_MODULES) $(filter conscrypt,$(PRODUCT_BOOT_JARS)))
6PRODUCT_BOOTCLASSPATH := $(subst $(space),:,$(foreach m,$(PRODUCT_BOOTCLASSPATH_JARS),/system/framework/$(m).jar)) 6PRODUCT_BOOTCLASSPATH := $(subst $(space),:,$(foreach m,$(PRODUCT_BOOTCLASSPATH_JARS),/system/framework/$(m).jar))
7 7
8PRODUCT_SYSTEM_SERVER_CLASSPATH := $(subst $(space),:,$(foreach m,$(PRODUCT_SYSTEM_SERVER_JARS),/system/framework/$(m).jar)) 8PRODUCT_SYSTEM_SERVER_CLASSPATH := $(subst $(space),:,$(foreach m,$(PRODUCT_SYSTEM_SERVER_JARS),/system/framework/$(m).jar))
@@ -118,6 +118,7 @@ ifeq ($(WRITE_SOONG_VARIABLES),true)
118 $(call add_json_list, PreoptBootClassPathDexFiles, $(DEXPREOPT_BOOTCLASSPATH_DEX_FILES)) 118 $(call add_json_list, PreoptBootClassPathDexFiles, $(DEXPREOPT_BOOTCLASSPATH_DEX_FILES))
119 $(call add_json_list, PreoptBootClassPathDexLocations, $(DEXPREOPT_BOOTCLASSPATH_DEX_LOCATIONS)) 119 $(call add_json_list, PreoptBootClassPathDexLocations, $(DEXPREOPT_BOOTCLASSPATH_DEX_LOCATIONS))
120 $(call add_json_list, BootJars, $(PRODUCT_BOOT_JARS)) 120 $(call add_json_list, BootJars, $(PRODUCT_BOOT_JARS))
121 $(call add_json_list, PreoptBootJars, $(DEXPREOPT_BOOT_JARS_MODULES))
121 $(call add_json_list, SystemServerJars, $(PRODUCT_SYSTEM_SERVER_JARS)) 122 $(call add_json_list, SystemServerJars, $(PRODUCT_SYSTEM_SERVER_JARS))
122 $(call add_json_list, SystemServerApps, $(PRODUCT_SYSTEM_SERVER_APPS)) 123 $(call add_json_list, SystemServerApps, $(PRODUCT_SYSTEM_SERVER_APPS))
123 $(call add_json_list, SpeedApps, $(PRODUCT_DEXPREOPT_SPEED_APPS)) 124 $(call add_json_list, SpeedApps, $(PRODUCT_DEXPREOPT_SPEED_APPS))
diff --git a/core/dex_preopt_libart_boot.mk b/core/dex_preopt_libart_boot.mk
index b31f5a847..47a8de871 100644
--- a/core/dex_preopt_libart_boot.mk
+++ b/core/dex_preopt_libart_boot.mk
@@ -113,7 +113,6 @@ $($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME) : $(LIBART_TARGE
113 --android-root=$(PRODUCT_OUT)/system \ 113 --android-root=$(PRODUCT_OUT)/system \
114 --no-inline-from=core-oj.jar \ 114 --no-inline-from=core-oj.jar \
115 --abort-on-hard-verifier-error \ 115 --abort-on-hard-verifier-error \
116 --abort-on-soft-verifier-error \
117 $(PRODUCT_DEX_PREOPT_BOOT_FLAGS) $(ART_BOOT_IMAGE_EXTRA_ARGS) \ 116 $(PRODUCT_DEX_PREOPT_BOOT_FLAGS) $(ART_BOOT_IMAGE_EXTRA_ARGS) \
118 || ( echo "$(DEX2OAT_FAILURE_MESSAGE)" ; false ) 117 || ( echo "$(DEX2OAT_FAILURE_MESSAGE)" ; false )
119 118
diff --git a/core/envsetup.mk b/core/envsetup.mk
index f5babb64a..8150fb6e6 100644
--- a/core/envsetup.mk
+++ b/core/envsetup.mk
@@ -206,7 +206,7 @@ endef
206################################################################# 206#################################################################
207# Set up minimal BOOTCLASSPATH list of jars to build/execute 207# Set up minimal BOOTCLASSPATH list of jars to build/execute
208# java code with dalvikvm/art. 208# java code with dalvikvm/art.
209TARGET_CORE_JARS := core-oj core-libart core-simple conscrypt okhttp bouncycastle apache-xml 209TARGET_CORE_JARS := core-oj core-libart conscrypt okhttp bouncycastle apache-xml
210ifeq ($(EMMA_INSTRUMENT),true) 210ifeq ($(EMMA_INSTRUMENT),true)
211 ifneq ($(EMMA_INSTRUMENT_STATIC),true) 211 ifneq ($(EMMA_INSTRUMENT_STATIC),true)
212 # For instrumented build, if Jacoco is not being included statically 212 # For instrumented build, if Jacoco is not being included statically
diff --git a/core/goma.mk b/core/goma.mk
index f5064e621..c265259da 100644
--- a/core/goma.mk
+++ b/core/goma.mk
@@ -16,17 +16,6 @@
16 16
17# Notice: this works only with Google's Goma build infrastructure. 17# Notice: this works only with Google's Goma build infrastructure.
18ifneq ($(filter-out false,$(USE_GOMA)),) 18ifneq ($(filter-out false,$(USE_GOMA)),)
19 # Goma requires a lot of processes and file descriptors.
20 # TODO(yyanagisawa): move these code to build/soong/uil/build/goma.go
21 ifeq ($(shell echo $$(($$(ulimit -u) < 2500 || $$(ulimit -n) < 16000))),1)
22 $(warning Max user processes and/or open files are insufficient)
23 ifeq ($(shell uname),Darwin)
24 $(error See go/ma/how-to-use-goma/how-to-use-goma-for-android to relax the limit)
25 else
26 $(error Adjust the limit by ulimit -u and ulimit -n)
27 endif
28 endif
29
30 ifdef GOMA_DIR 19 ifdef GOMA_DIR
31 goma_dir := $(GOMA_DIR) 20 goma_dir := $(GOMA_DIR)
32 else 21 else
diff --git a/core/jacoco.mk b/core/jacoco.mk
index 6406df45a..148bb045e 100644
--- a/core/jacoco.mk
+++ b/core/jacoco.mk
@@ -51,7 +51,7 @@ $(my_unzipped_timestamp_path): $(LOCAL_FULL_CLASSES_PRE_JACOCO_JAR)
51 -d $(PRIVATE_UNZIPPED_PATH) \ 51 -d $(PRIVATE_UNZIPPED_PATH) \
52 $(PRIVATE_INCLUDE_ARGS) 52 $(PRIVATE_INCLUDE_ARGS)
53 (cd $(PRIVATE_UNZIPPED_PATH) && rm -rf $(PRIVATE_EXCLUDE_ARGS)) 53 (cd $(PRIVATE_UNZIPPED_PATH) && rm -rf $(PRIVATE_EXCLUDE_ARGS))
54 (cd $(PRIVATE_UNZIPPED_PATH) && find -not -name "*.class" -type f | xargs --no-run-if-empty rm) 54 (cd $(PRIVATE_UNZIPPED_PATH) && find -not -name "*.class" -type f -exec rm {} \;)
55 touch $(PRIVATE_UNZIPPED_TIMESTAMP_PATH) 55 touch $(PRIVATE_UNZIPPED_TIMESTAMP_PATH)
56# Unfortunately in the previous task above, 56# Unfortunately in the previous task above,
57# 'rm -rf $(PRIVATE_EXCLUDE_ARGS)' needs to be a separate 57# 'rm -rf $(PRIVATE_EXCLUDE_ARGS)' needs to be a separate
diff --git a/core/main.mk b/core/main.mk
index 4f81c2163..c84cbe067 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -1096,6 +1096,13 @@ ifdef FULL_BUILD
1096 $(TARGET_OUT_SYSTEM_OTHER)/%.vdex \ 1096 $(TARGET_OUT_SYSTEM_OTHER)/%.vdex \
1097 $(TARGET_OUT_SYSTEM_OTHER)/%.art 1097 $(TARGET_OUT_SYSTEM_OTHER)/%.art
1098 endif 1098 endif
1099
1100CERTIFICATE_VIOLATION_MODULES_FILENAME := $(PRODUCT_OUT)/certificate_violation_modules.txt
1101$(CERTIFICATE_VIOLATION_MODULES_FILENAME):
1102 rm -f $@
1103 $(foreach m,$(sort $(CERTIFICATE_VIOLATION_MODULES)), echo $(m) >> $@;)
1104$(call dist-for-goals,droidcore,$(CERTIFICATE_VIOLATION_MODULES_FILENAME))
1105
1099 all_offending_files := 1106 all_offending_files :=
1100 $(foreach makefile,$(ARTIFACT_PATH_REQUIREMENT_PRODUCTS),\ 1107 $(foreach makefile,$(ARTIFACT_PATH_REQUIREMENT_PRODUCTS),\
1101 $(eval requirements := $(PRODUCTS.$(makefile).ARTIFACT_PATH_REQUIREMENTS)) \ 1108 $(eval requirements := $(PRODUCTS.$(makefile).ARTIFACT_PATH_REQUIREMENTS)) \
@@ -1298,8 +1305,8 @@ auxiliary: $(INSTALLED_AUX_TARGETS)
1298 1305
1299# Build files and then package it into the rom formats 1306# Build files and then package it into the rom formats
1300.PHONY: droidcore 1307.PHONY: droidcore
1301droidcore: files \ 1308droidcore: $(filter $(HOST_OUT_ROOT)/%,$(modules_to_install)) \
1302 systemimage \ 1309 $(INSTALLED_SYSTEMIMAGE_TARGET) \
1303 $(INSTALLED_RAMDISK_TARGET) \ 1310 $(INSTALLED_RAMDISK_TARGET) \
1304 $(INSTALLED_BOOTIMAGE_TARGET) \ 1311 $(INSTALLED_BOOTIMAGE_TARGET) \
1305 $(INSTALLED_RECOVERYIMAGE_TARGET) \ 1312 $(INSTALLED_RECOVERYIMAGE_TARGET) \
@@ -1330,6 +1337,7 @@ droidcore: files \
1330 $(INSTALLED_FILES_JSON_ROOT) \ 1337 $(INSTALLED_FILES_JSON_ROOT) \
1331 $(INSTALLED_FILES_FILE_RECOVERY) \ 1338 $(INSTALLED_FILES_FILE_RECOVERY) \
1332 $(INSTALLED_FILES_JSON_RECOVERY) \ 1339 $(INSTALLED_FILES_JSON_RECOVERY) \
1340 $(INSTALLED_ANDROID_INFO_TXT_TARGET) \
1333 soong_docs 1341 soong_docs
1334 1342
1335# dist_files only for putting your library into the dist directory with a full build. 1343# dist_files only for putting your library into the dist directory with a full build.
diff --git a/core/package_internal.mk b/core/package_internal.mk
index 75cc547be..31cb01eb0 100644
--- a/core/package_internal.mk
+++ b/core/package_internal.mk
@@ -88,7 +88,7 @@ else
88endif 88endif
89 89
90# If LOCAL_MODULE matches a rule in PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES, 90# If LOCAL_MODULE matches a rule in PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES,
91# override the manfest package name by the (first) rule matched 91# override the manifest package name by the (first) rule matched
92override_manifest_name := $(strip $(word 1,\ 92override_manifest_name := $(strip $(word 1,\
93 $(foreach rule,$(PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES),\ 93 $(foreach rule,$(PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES),\
94 $(eval _pkg_name_pat := $(call word-colon,1,$(rule)))\ 94 $(eval _pkg_name_pat := $(call word-colon,1,$(rule)))\
@@ -100,7 +100,7 @@ override_manifest_name := $(strip $(word 1,\
100)) 100))
101 101
102ifneq (,$(override_manifest_name)) 102ifneq (,$(override_manifest_name))
103# Note: this can override LOCAL_MANFEST_PACKAGE_NAME value set in Android.mk 103# Note: this can override LOCAL_MANIFEST_PACKAGE_NAME value set in Android.mk
104LOCAL_MANIFEST_PACKAGE_NAME := $(override_manifest_name) 104LOCAL_MANIFEST_PACKAGE_NAME := $(override_manifest_name)
105endif 105endif
106 106
@@ -535,6 +535,7 @@ endif
535ifeq ($(dir $(strip $(LOCAL_CERTIFICATE))),./) 535ifeq ($(dir $(strip $(LOCAL_CERTIFICATE))),./)
536 LOCAL_CERTIFICATE := $(dir $(DEFAULT_SYSTEM_DEV_CERTIFICATE))$(LOCAL_CERTIFICATE) 536 LOCAL_CERTIFICATE := $(dir $(DEFAULT_SYSTEM_DEV_CERTIFICATE))$(LOCAL_CERTIFICATE)
537endif 537endif
538include $(BUILD_SYSTEM)/app_certificate_validate.mk
538private_key := $(LOCAL_CERTIFICATE).pk8 539private_key := $(LOCAL_CERTIFICATE).pk8
539certificate := $(LOCAL_CERTIFICATE).x509.pem 540certificate := $(LOCAL_CERTIFICATE).x509.pem
540additional_certificates := $(foreach c,$(LOCAL_ADDITIONAL_CERTIFICATES), $(c).x509.pem $(c).pk8) 541additional_certificates := $(foreach c,$(LOCAL_ADDITIONAL_CERTIFICATES), $(c).x509.pem $(c).pk8)
diff --git a/core/pdk_config.mk b/core/pdk_config.mk
index b2c9e9e49..383c11ad0 100644
--- a/core/pdk_config.mk
+++ b/core/pdk_config.mk
@@ -20,7 +20,6 @@ PDK_PLATFORM_JAVA_ZIP_JAVA_TARGET_LIB_DIR += \
20 target/common/obj/JAVA_LIBRARIES/conscrypt_intermediates \ 20 target/common/obj/JAVA_LIBRARIES/conscrypt_intermediates \
21 target/common/obj/JAVA_LIBRARIES/core-oj_intermediates \ 21 target/common/obj/JAVA_LIBRARIES/core-oj_intermediates \
22 target/common/obj/JAVA_LIBRARIES/core-libart_intermediates \ 22 target/common/obj/JAVA_LIBRARIES/core-libart_intermediates \
23 target/common/obj/JAVA_LIBRARIES/core-simple_intermediates \
24 target/common/obj/JAVA_LIBRARIES/legacy-test_intermediates \ 23 target/common/obj/JAVA_LIBRARIES/legacy-test_intermediates \
25 target/common/obj/JAVA_LIBRARIES/legacy-android-test_intermediates \ 24 target/common/obj/JAVA_LIBRARIES/legacy-android-test_intermediates \
26 target/common/obj/JAVA_LIBRARIES/ext_intermediates \ 25 target/common/obj/JAVA_LIBRARIES/ext_intermediates \
diff --git a/core/prebuilt_internal.mk b/core/prebuilt_internal.mk
index 66913c1ac..960d8d1c5 100644
--- a/core/prebuilt_internal.mk
+++ b/core/prebuilt_internal.mk
@@ -306,6 +306,8 @@ else
306 $(built_module) : PRIVATE_CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem 306 $(built_module) : PRIVATE_CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem
307endif 307endif
308 308
309include $(BUILD_SYSTEM)/app_certificate_validate.mk
310
309# Disable dex-preopt of prebuilts to save space, if requested. 311# Disable dex-preopt of prebuilts to save space, if requested.
310ifndef LOCAL_DEX_PREOPT 312ifndef LOCAL_DEX_PREOPT
311ifeq ($(DONT_DEXPREOPT_PREBUILTS),true) 313ifeq ($(DONT_DEXPREOPT_PREBUILTS),true)
diff --git a/core/product.mk b/core/product.mk
index 1420b46e1..2d7ace2fa 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -204,6 +204,8 @@ _product_var_list := \
204 PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE \ 204 PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE \
205 PRODUCT_ACTIONABLE_COMPATIBLE_PROPERTY_DISABLE \ 205 PRODUCT_ACTIONABLE_COMPATIBLE_PROPERTY_DISABLE \
206 PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS \ 206 PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS \
207 PRODUCT_ENFORCE_ARTIFACT_SYSTEM_CERTIFICATE_REQUIREMENT \
208 PRODUCT_ARTIFACT_SYSTEM_CERTIFICATE_REQUIREMENT_WHITELIST \
207 PRODUCT_ARTIFACT_PATH_REQUIREMENT_HINT \ 209 PRODUCT_ARTIFACT_PATH_REQUIREMENT_HINT \
208 PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST \ 210 PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST \
209 PRODUCT_USE_DYNAMIC_PARTITION_SIZE \ 211 PRODUCT_USE_DYNAMIC_PARTITION_SIZE \
diff --git a/core/product_config.mk b/core/product_config.mk
index 47b4c7aa0..c58405cb2 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -367,6 +367,11 @@ PRODUCT_PRODUCT_PROPERTIES := \
367 $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PRODUCT_PROPERTIES)) 367 $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PRODUCT_PROPERTIES))
368.KATI_READONLY := PRODUCT_PRODUCT_PROPERTIES 368.KATI_READONLY := PRODUCT_PRODUCT_PROPERTIES
369 369
370ENFORCE_SYSTEM_CERTIFICATE := \
371 $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ENFORCE_ARTIFACT_SYSTEM_CERTIFICATE_REQUIREMENT)
372
373ENFORCE_SYSTEM_CERTIFICATE_WHITELIST := \
374 $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ARTIFACT_SYSTEM_CERTIFICATE_REQUIREMENT_WHITELIST))
370 375
371# A list of property assignments, like "key = value", with zero or more 376# A list of property assignments, like "key = value", with zero or more
372# whitespace characters on either side of the '='. 377# whitespace characters on either side of the '='.
diff --git a/core/python_binary_host_test_config_template.xml b/core/python_binary_host_test_config_template.xml
new file mode 100644
index 000000000..0f63953d9
--- /dev/null
+++ b/core/python_binary_host_test_config_template.xml
@@ -0,0 +1,21 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2018 The Android Open Source Project
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15-->
16<configuration description="Config to run {MODULE} unittests">
17 <test class="com.android.tradefed.testtype.python.PythonBinaryHostTest" >
18 <option name="par-file-name" value="{MODULE}" />
19 <option name="test-timeout" value="5m" />
20 </test>
21</configuration>
diff --git a/core/soong_app_prebuilt.mk b/core/soong_app_prebuilt.mk
index 73d934bf9..91865bcc6 100644
--- a/core/soong_app_prebuilt.mk
+++ b/core/soong_app_prebuilt.mk
@@ -74,7 +74,28 @@ ifneq ($(BUILD_PLATFORM_ZIP),)
74 $(eval $(call copy-one-file,$(LOCAL_SOONG_DEX_JAR),$(dir $(LOCAL_BUILT_MODULE))package.dex.apk)) 74 $(eval $(call copy-one-file,$(LOCAL_SOONG_DEX_JAR),$(dir $(LOCAL_BUILT_MODULE))package.dex.apk))
75endif 75endif
76 76
77$(eval $(call copy-one-file,$(LOCAL_PREBUILT_MODULE_FILE),$(LOCAL_BUILT_MODULE))) 77# Run veridex on product, product_services and vendor modules.
78# We skip it for unbundled app builds where we cannot build veridex.
79module_run_appcompat :=
80ifeq (true,$(filter true, \
81 $(LOCAL_PRODUCT_MODULE) $(LOCAL_PRODUCT_SERVICES_MODULE) \
82 $(LOCAL_VENDOR_MODULE) $(LOCAL_PROPRIETARY_MODULE)))
83ifeq (,$(TARGET_BUILD_APPS)$(filter true,$(TARGET_BUILD_PDK))) # ! unbundled app build
84 module_run_appcompat := true
85endif
86endif
87
88ifeq ($(module_run_appcompat),true)
89 $(LOCAL_BUILT_MODULE): $(appcompat-files)
90 $(LOCAL_BUILT_MODULE): PRIVATE_INSTALLED_MODULE := $(LOCAL_INSTALLED_MODULE)
91 $(LOCAL_BUILT_MODULE): $(LOCAL_PREBUILT_MODULE_FILE)
92 @echo "Copy: $@"
93 $(copy-file-to-target)
94 $(call appcompat-header, aapt2)
95 $(run-appcompat)
96else
97 $(eval $(call copy-one-file,$(LOCAL_PREBUILT_MODULE_FILE),$(LOCAL_BUILT_MODULE)))
98endif
78 99
79my_built_installed := $(foreach f,$(LOCAL_SOONG_BUILT_INSTALLED),\ 100my_built_installed := $(foreach f,$(LOCAL_SOONG_BUILT_INSTALLED),\
80 $(call word-colon,1,$(f)):$(PRODUCT_OUT)$(call word-colon,2,$(f))) 101 $(call word-colon,1,$(f)):$(PRODUCT_OUT)$(call word-colon,2,$(f)))
@@ -108,7 +129,7 @@ ifdef LOCAL_CERTIFICATE
108 PACKAGES.$(LOCAL_MODULE).CERTIFICATE := $(LOCAL_CERTIFICATE) 129 PACKAGES.$(LOCAL_MODULE).CERTIFICATE := $(LOCAL_CERTIFICATE)
109 PACKAGES.$(LOCAL_MODULE).PRIVATE_KEY := $(patsubst %.x509.pem,%.pk8,$(LOCAL_CERTIFICATE)) 130 PACKAGES.$(LOCAL_MODULE).PRIVATE_KEY := $(patsubst %.x509.pem,%.pk8,$(LOCAL_CERTIFICATE))
110endif 131endif
111 132include $(BUILD_SYSTEM)/app_certificate_validate.mk
112PACKAGES.$(LOCAL_MODULE).OVERRIDES := $(strip $(LOCAL_OVERRIDES_PACKAGES)) 133PACKAGES.$(LOCAL_MODULE).OVERRIDES := $(strip $(LOCAL_OVERRIDES_PACKAGES))
113 134
114ifdef LOCAL_SOONG_BUNDLE 135ifdef LOCAL_SOONG_BUNDLE
diff --git a/core/soong_config.mk b/core/soong_config.mk
index 31c77d4b8..2363f2b16 100644
--- a/core/soong_config.mk
+++ b/core/soong_config.mk
@@ -83,7 +83,7 @@ $(call add_json_bool, Safestack, $(filter true,$(USE_SAF
83$(call add_json_bool, EnableCFI, $(call invert_bool,$(filter false,$(ENABLE_CFI)))) 83$(call add_json_bool, EnableCFI, $(call invert_bool,$(filter false,$(ENABLE_CFI))))
84$(call add_json_list, CFIExcludePaths, $(CFI_EXCLUDE_PATHS) $(PRODUCT_CFI_EXCLUDE_PATHS)) 84$(call add_json_list, CFIExcludePaths, $(CFI_EXCLUDE_PATHS) $(PRODUCT_CFI_EXCLUDE_PATHS))
85$(call add_json_list, CFIIncludePaths, $(CFI_INCLUDE_PATHS) $(PRODUCT_CFI_INCLUDE_PATHS)) 85$(call add_json_list, CFIIncludePaths, $(CFI_INCLUDE_PATHS) $(PRODUCT_CFI_INCLUDE_PATHS))
86$(call add_json_bool, EnableXOM, $(filter true,$(ENABLE_XOM))) 86$(call add_json_bool, EnableXOM, $(call invert_bool,$(filter false,$(ENABLE_XOM))))
87$(call add_json_list, XOMExcludePaths, $(XOM_EXCLUDE_PATHS) $(PRODUCT_XOM_EXCLUDE_PATHS)) 87$(call add_json_list, XOMExcludePaths, $(XOM_EXCLUDE_PATHS) $(PRODUCT_XOM_EXCLUDE_PATHS))
88$(call add_json_list, IntegerOverflowExcludePaths, $(INTEGER_OVERFLOW_EXCLUDE_PATHS) $(PRODUCT_INTEGER_OVERFLOW_EXCLUDE_PATHS)) 88$(call add_json_list, IntegerOverflowExcludePaths, $(INTEGER_OVERFLOW_EXCLUDE_PATHS) $(PRODUCT_INTEGER_OVERFLOW_EXCLUDE_PATHS))
89 89
@@ -111,6 +111,9 @@ $(call add_json_str, Override_rs_driver, $(OVERRIDE_RS_DRIVER))
111$(call add_json_bool, UncompressPrivAppDex, $(call invert_bool,$(filter true,$(DONT_UNCOMPRESS_PRIV_APPS_DEXS)))) 111$(call add_json_bool, UncompressPrivAppDex, $(call invert_bool,$(filter true,$(DONT_UNCOMPRESS_PRIV_APPS_DEXS))))
112$(call add_json_list, ModulesLoadedByPrivilegedModules, $(PRODUCT_LOADED_BY_PRIVILEGED_MODULES)) 112$(call add_json_list, ModulesLoadedByPrivilegedModules, $(PRODUCT_LOADED_BY_PRIVILEGED_MODULES))
113 113
114$(call add_json_list, BootJars, $(PRODUCT_BOOT_JARS))
115$(call add_json_list, PreoptBootJars, $(DEXPREOPT_BOOT_JARS_MODULES))
116
114$(call add_json_bool, DisableDexPreopt, $(call invert_bool,$(filter true,$(WITH_DEXPREOPT)))) 117$(call add_json_bool, DisableDexPreopt, $(call invert_bool,$(filter true,$(WITH_DEXPREOPT))))
115$(call add_json_list, DisableDexPreoptModules, $(DEXPREOPT_DISABLED_MODULES)) 118$(call add_json_list, DisableDexPreoptModules, $(DEXPREOPT_DISABLED_MODULES))
116$(call add_json_str, DexPreoptProfileDir, $(PRODUCT_DEX_PREOPT_PROFILE_DIR)) 119$(call add_json_str, DexPreoptProfileDir, $(PRODUCT_DEX_PREOPT_PROFILE_DIR))
@@ -146,6 +149,9 @@ $(call add_json_str, DexpreoptGlobalConfig, $(DEX_PREOPT_CONFIG))
146 149
147$(call add_json_list, ManifestPackageNameOverrides, $(PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES)) 150$(call add_json_list, ManifestPackageNameOverrides, $(PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES))
148 151
152$(call add_json_bool, EnforceSystemCertificate, $(ENFORCE_SYSTEM_CERTIFICATE))
153$(call add_json_list, EnforceSystemCertificateWhitelist, $(ENFORCE_SYSTEM_CERTIFICATE_WHITELIST))
154
149$(call add_json_map, VendorVars) 155$(call add_json_map, VendorVars)
150$(foreach namespace,$(SOONG_CONFIG_NAMESPACES),\ 156$(foreach namespace,$(SOONG_CONFIG_NAMESPACES),\
151 $(call add_json_map, $(namespace))\ 157 $(call add_json_map, $(namespace))\
diff --git a/core/soong_java_prebuilt.mk b/core/soong_java_prebuilt.mk
index a62590d84..cfda44e0e 100644
--- a/core/soong_java_prebuilt.mk
+++ b/core/soong_java_prebuilt.mk
@@ -121,6 +121,11 @@ ifdef LOCAL_SOONG_DEX_JAR
121 java-dex : $(common_javalib.jar) 121 java-dex : $(common_javalib.jar)
122 endif # LOCAL_UNINSTALLABLE_MODULE 122 endif # LOCAL_UNINSTALLABLE_MODULE
123else # LOCAL_SOONG_DEX_JAR 123else # LOCAL_SOONG_DEX_JAR
124 ifndef LOCAL_UNINSTALLABLE_MODULE
125 ifndef LOCAL_IS_HOST_MODULE
126 $(call pretty-error,Installable device module must have LOCAL_SOONG_DEX_JAR set)
127 endif
128 endif
124 $(eval $(call copy-one-file,$(full_classes_jar),$(LOCAL_BUILT_MODULE))) 129 $(eval $(call copy-one-file,$(full_classes_jar),$(LOCAL_BUILT_MODULE)))
125endif # LOCAL_SOONG_DEX_JAR 130endif # LOCAL_SOONG_DEX_JAR
126 131
diff --git a/core/tasks/module-info.mk b/core/tasks/module-info.mk
index 9eb3ab329..2c56162d5 100644
--- a/core/tasks/module-info.mk
+++ b/core/tasks/module-info.mk
@@ -25,7 +25,7 @@ $(MODULE_INFO_JSON):
25# If ONE_SHOT_MAKEFILE is set, our view of the world is smaller, so don't 25# If ONE_SHOT_MAKEFILE is set, our view of the world is smaller, so don't
26# rewrite the file in that came. 26# rewrite the file in that came.
27ifndef ONE_SHOT_MAKEFILE 27ifndef ONE_SHOT_MAKEFILE
28files: $(MODULE_INFO_JSON) 28droidcore: $(MODULE_INFO_JSON)
29endif 29endif
30 30
31$(call dist-for-goals, general-tests, $(MODULE_INFO_JSON)) 31$(call dist-for-goals, general-tests, $(MODULE_INFO_JSON))