Merge "Retire unused variable"
diff --git a/core/board_config.mk b/core/board_config.mk
index b1b7b81..16acdde 100644
--- a/core/board_config.mk
+++ b/core/board_config.mk
@@ -204,7 +204,10 @@
# Conditional to building on linux, as dex2oat currently does not work on darwin.
ifeq ($(HOST_OS),linux)
- WITH_DEXPREOPT := true
+ # TODO(riscv64) add compiler support and enable dexpreopt on RISC-V.
+ ifneq ($(TARGET_ARCH),riscv64)
+ WITH_DEXPREOPT := true
+ endif
endif
# ###############################################################
diff --git a/core/board_config_wifi.mk b/core/board_config_wifi.mk
index ddeb0d7..a736099 100644
--- a/core/board_config_wifi.mk
+++ b/core/board_config_wifi.mk
@@ -74,4 +74,7 @@
endif
ifdef WIFI_AVOID_IFACE_RESET_MAC_CHANGE
$(call soong_config_set,wifi,avoid_iface_reset_mac_change,true)
-endif
\ No newline at end of file
+endif
+ifdef WIFI_SKIP_STATE_TOGGLE_OFF_ON_FOR_NAN
+ $(call soong_config_set,wifi,wifi_skip_state_toggle_off_on_for_nan,true)
+endif
diff --git a/core/clear_vars.mk b/core/clear_vars.mk
index 8913ad0..bb7ba1b 100644
--- a/core/clear_vars.mk
+++ b/core/clear_vars.mk
@@ -503,6 +503,7 @@
# Robolectric variables
LOCAL_INSTRUMENT_SOURCE_DIRS :=
+LOCAL_INSTRUMENT_SRCJARS :=
LOCAL_ROBOTEST_FAILURE_FATAL :=
LOCAL_ROBOTEST_FILES :=
LOCAL_ROBOTEST_TIMEOUT :=
diff --git a/core/definitions.mk b/core/definitions.mk
index a0337c2..ce1248e 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -2546,7 +2546,87 @@
@$(call emit-line,$(wordlist 58001,58500,$(1)),$(2))
@$(call emit-line,$(wordlist 58501,59000,$(1)),$(2))
@$(call emit-line,$(wordlist 59001,59500,$(1)),$(2))
- @$(if $(wordlist 59501,59502,$(1)),$(error Too many words ($(words $(1)))))
+ @$(call emit-line,$(wordlist 59501,60000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 60001,60500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 60501,61000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 61001,61500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 61501,62000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 62001,62500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 62501,63000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 63001,63500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 63501,64000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 64001,64500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 64501,65000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 65001,65500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 65501,66000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 66001,66500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 66501,67000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 67001,67500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 67501,68000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 68001,68500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 68501,69000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 69001,69500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 69501,70000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 70001,70500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 70501,71000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 71001,71500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 71501,72000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 72001,72500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 72501,73000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 73001,73500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 73501,74000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 74001,74500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 74501,75000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 75001,75500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 75501,76000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 76001,76500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 76501,77000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 77001,77500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 77501,78000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 78001,78500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 78501,79000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 79001,79500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 79501,80000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 80001,80500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 80501,81000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 81001,81500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 81501,82000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 82001,82500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 82501,83000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 83001,83500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 83501,84000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 84001,84500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 84501,85000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 85001,85500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 85501,86000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 86001,86500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 86501,87000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 87001,87500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 87501,88000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 88001,88500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 88501,89000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 89001,89500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 89501,90000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 90001,90500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 90501,91000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 91001,91500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 91501,92000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 92001,92500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 92501,93000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 93001,93500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 93501,94000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 94001,94500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 94501,95000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 95001,95500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 95501,96000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 96001,96500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 96501,97000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 97001,97500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 97501,98000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 98001,98500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 98501,99000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 99001,99500,$(1)),$(2))
+ @$(if $(wordlist 99501,99502,$(1)),$(error dump-words-to-file: Too many words ($(words $(1)))))
endef
# Return jar arguments to compress files in a given directory
# $(1): directory
diff --git a/core/dex_preopt_config.mk b/core/dex_preopt_config.mk
index e36e2eb..0bb47d1 100644
--- a/core/dex_preopt_config.mk
+++ b/core/dex_preopt_config.mk
@@ -65,9 +65,12 @@
# Non eng linux builds must have preopt enabled so that system server doesn't run as interpreter
# only. b/74209329
ifeq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
- ifneq (true,$(WITH_DEXPREOPT))
- ifneq (true,$(WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY))
- $(call pretty-error, DEXPREOPT must be enabled for user and userdebug builds)
+ # TODO(riscv64) add compiler support and enable dexpreopt on RISC-V.
+ ifeq (,$(filter riscv64, $(TARGET_ARCH)))
+ ifneq (true,$(WITH_DEXPREOPT))
+ ifneq (true,$(WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY))
+ $(call pretty-error, DEXPREOPT must be enabled for user and userdebug builds)
+ endif
endif
endif
endif
diff --git a/core/java_common.mk b/core/java_common.mk
index 5981b60..0e03d0b 100644
--- a/core/java_common.mk
+++ b/core/java_common.mk
@@ -296,16 +296,16 @@
# Note: the lib naming scheme must be kept in sync with build/soong/java/sdk_library.go.
sdk_lib_suffix = $(call pretty-error,sdk_lib_suffix was not set correctly)
ifeq (current,$(LOCAL_SDK_VERSION))
- sdk_module := android_stubs_current
+ sdk_module := $(ANDROID_PUBLIC_STUBS)
sdk_lib_suffix := .stubs
else ifeq (system_current,$(LOCAL_SDK_VERSION))
- sdk_module := android_system_stubs_current
+ sdk_module := $(ANDROID_SYSTEM_STUBS)
sdk_lib_suffix := .stubs.system
else ifeq (test_current,$(LOCAL_SDK_VERSION))
- sdk_module := android_test_stubs_current
+ sdk_module := $(ANDROID_TEST_STUBS)
sdk_lib_suffix := .stubs.test
else ifeq (core_current,$(LOCAL_SDK_VERSION))
- sdk_module := core.current.stubs
+ sdk_module := $(ANDROID_CORE_STUBS)
sdk_lib_suffix = $(call pretty-error,LOCAL_SDK_LIBRARIES not supported for LOCAL_SDK_VERSION = core_current)
endif
sdk_libs := $(foreach lib_name,$(LOCAL_SDK_LIBRARIES),$(lib_name)$(sdk_lib_suffix))
diff --git a/core/main.mk b/core/main.mk
index 22a69d8..db497d9 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -1899,11 +1899,11 @@
endif
# Put XML formatted API files in the dist dir.
- $(TARGET_OUT_COMMON_INTERMEDIATES)/api.xml: $(call java-lib-files,android_stubs_current) $(APICHECK)
- $(TARGET_OUT_COMMON_INTERMEDIATES)/system-api.xml: $(call java-lib-files,android_system_stubs_current) $(APICHECK)
- $(TARGET_OUT_COMMON_INTERMEDIATES)/module-lib-api.xml: $(call java-lib-files,android_module_lib_stubs_current) $(APICHECK)
- $(TARGET_OUT_COMMON_INTERMEDIATES)/system-server-api.xml: $(call java-lib-files,android_system_server_stubs_current) $(APICHECK)
- $(TARGET_OUT_COMMON_INTERMEDIATES)/test-api.xml: $(call java-lib-files,android_test_stubs_current) $(APICHECK)
+ $(TARGET_OUT_COMMON_INTERMEDIATES)/api.xml: $(call java-lib-files,$(ANDROID_PUBLIC_STUBS)) $(APICHECK)
+ $(TARGET_OUT_COMMON_INTERMEDIATES)/system-api.xml: $(call java-lib-files,$(ANDROID_SYSTEM_STUBS)) $(APICHECK)
+ $(TARGET_OUT_COMMON_INTERMEDIATES)/module-lib-api.xml: $(call java-lib-files,$(ANDROID_MODULE_LIB_STUBS)) $(APICHECK)
+ $(TARGET_OUT_COMMON_INTERMEDIATES)/system-server-api.xml: $(call java-lib-files,$(ANDROID_SYSTEM_SERVER_STUBS)) $(APICHECK)
+ $(TARGET_OUT_COMMON_INTERMEDIATES)/test-api.xml: $(call java-lib-files,$(ANDROID_TEST_STUBS)) $(APICHECK)
api_xmls := $(addprefix $(TARGET_OUT_COMMON_INTERMEDIATES)/,api.xml system-api.xml module-lib-api.xml system-server-api.xml test-api.xml)
$(api_xmls):
diff --git a/core/tasks/test_mapping.mk b/core/tasks/test_mapping.mk
index 0b0c93c..eb2a585 100644
--- a/core/tasks/test_mapping.mk
+++ b/core/tasks/test_mapping.mk
@@ -21,17 +21,17 @@
intermediates := $(call intermediates-dir-for,PACKAGING,test_mapping)
test_mappings_zip := $(intermediates)/test_mappings.zip
test_mapping_list := $(OUT_DIR)/.module_paths/TEST_MAPPING.list
-test_mappings := $(file <$(test_mapping_list))
-$(test_mappings_zip) : PRIVATE_test_mappings := $(subst $(newline),\n,$(test_mappings))
$(test_mappings_zip) : PRIVATE_all_disabled_presubmit_tests := $(ALL_DISABLED_PRESUBMIT_TESTS)
+$(test_mappings_zip) : PRIVATE_test_mapping_list := $(test_mapping_list)
-$(test_mappings_zip) : $(test_mappings) $(SOONG_ZIP)
+$(test_mappings_zip) : .KATI_DEPFILE := $(test_mappings_zip).d
+$(test_mappings_zip) : $(test_mapping_list) $(SOONG_ZIP)
@echo "Building artifact to include TEST_MAPPING files and tests to skip in presubmit check."
rm -rf $@ $(dir $@)/disabled-presubmit-tests
echo $(sort $(PRIVATE_all_disabled_presubmit_tests)) | tr " " "\n" > $(dir $@)/disabled-presubmit-tests
- echo -e "$(PRIVATE_test_mappings)" > $@.list
- $(SOONG_ZIP) -o $@ -C . -l $@.list -C $(dir $@) -f $(dir $@)/disabled-presubmit-tests
- rm -f $@.list $(dir $@)/disabled-presubmit-tests
+ $(SOONG_ZIP) -o $@ -C . -l $(PRIVATE_test_mapping_list) -C $(dir $@) -f $(dir $@)/disabled-presubmit-tests
+ echo "$@ : " $$(cat $(PRIVATE_test_mapping_list)) > $@.d
+ rm -f $(dir $@)/disabled-presubmit-tests
test_mapping : $(test_mappings_zip)
diff --git a/target/board/BoardConfigEmuCommon.mk b/target/board/BoardConfigEmuCommon.mk
index 3524b7c..6ed08f0 100644
--- a/target/board/BoardConfigEmuCommon.mk
+++ b/target/board/BoardConfigEmuCommon.mk
@@ -38,6 +38,7 @@
BOARD_EMULATOR_DYNAMIC_PARTITIONS_PARTITION_LIST := \
system \
+ system_dlkm \
system_ext \
product \
vendor
@@ -47,6 +48,10 @@
TARGET_COPY_OUT_SYSTEM_EXT := system_ext
BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
+BOARD_USES_SYSTEM_DLKMIMAGE := true
+BOARD_SYSTEM_DLKMIMAGE_FILE_SYSTEM_TYPE := erofs
+TARGET_COPY_OUT_SYSTEM_DLKM := system_dlkm
+
# 8G
BOARD_EMULATOR_DYNAMIC_PARTITIONS_SIZE ?= 8589934592
diff --git a/target/board/generic_riscv64/BoardConfig.mk b/target/board/generic_riscv64/BoardConfig.mk
index 906f7f0..53379bb 100644
--- a/target/board/generic_riscv64/BoardConfig.mk
+++ b/target/board/generic_riscv64/BoardConfig.mk
@@ -26,3 +26,6 @@
# Temporary hack while prebuilt modules are missing riscv64.
ALLOW_MISSING_DEPENDENCIES := true
+
+# Temporary until dex2oat works when targeting riscv64
+WITH_DEXPREOPT := false
diff --git a/target/board/linux_bionic/BoardConfig.mk b/target/board/linux_bionic/BoardConfig.mk
index 7938bdb..7fca911 100644
--- a/target/board/linux_bionic/BoardConfig.mk
+++ b/target/board/linux_bionic/BoardConfig.mk
@@ -17,7 +17,11 @@
# (device) target architectures are irrelevant. However, the build system isn't
# prepared to handle no target architectures at all, so pick something
# arbitrarily.
-TARGET_ARCH_SUITE := ndk
+TARGET_ARCH := arm
+TARGET_ARCH_VARIANT := armv7-a-neon
+TARGET_CPU_VARIANT := generic
+TARGET_CPU_ABI := armeabi-v7a
+TARGET_CPU_ABI2 := armeabi
HOST_CROSS_OS := linux_bionic
HOST_CROSS_ARCH := x86_64
diff --git a/target/product/aosp_riscv64.mk b/target/product/aosp_riscv64.mk
index a6784cb..bc35b95 100644
--- a/target/product/aosp_riscv64.mk
+++ b/target/product/aosp_riscv64.mk
@@ -30,8 +30,7 @@
# GSI for system/product & support 64-bit apps only
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk)
-#$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk)
-TARGET_FLATTEN_APEX := false
+$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk)
#
# All components inherited here go to system_ext image
@@ -58,24 +57,6 @@
$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_release.mk)
endif
-# TODO: this list should come via mainline_system.mk, but for now list
-# just the modules that work for riscv64.
-PRODUCT_PACKAGES := \
- init.environ.rc \
- init_first_stage \
- init_system \
- linker \
- shell_and_utilities \
- com.android.art \
- com.android.conscrypt \
- com.android.i18n \
- com.android.runtime \
- com.android.tzdata \
- com.android.os.statsd \
-
-$(call inherit-product, $(SRC_TARGET_DIR)/product/default_art_config.mk)
-PRODUCT_USES_DEFAULT_ART_CONFIG := false
-
PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \
root/init.zygote64.rc
diff --git a/target/product/fullmte.mk b/target/product/fullmte.mk
new file mode 100644
index 0000000..d47c685
--- /dev/null
+++ b/target/product/fullmte.mk
@@ -0,0 +1,26 @@
+#
+# Copyright (C) 2023 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.
+#
+
+# Enables more comprehensive detection of memory errors on hardware that
+# supports the ARM Memory Tagging Extension (MTE), by building the image with
+# MTE stack instrumentation and forcing MTE on in SYNC mode in all processes.
+# For more details, see:
+# https://source.android.com/docs/security/test/memory-safety/arm-mte
+ifeq ($(filter memtag_heap,$(SANITIZE_TARGET)),)
+ SANITIZE_TARGET := $(strip $(SANITIZE_TARGET) memtag_heap memtag_stack)
+ SANITIZE_TARGET_DIAG := $(strip $(SANITIZE_TARGET_DIAG) memtag_heap)
+endif
+PRODUCT_PRODUCT_PROPERTIES += persist.arm64.memtag.default=sync
diff --git a/tests/b_tests.sh b/tests/b_tests.sh
index 13f156d..491d762 100755
--- a/tests/b_tests.sh
+++ b/tests/b_tests.sh
@@ -24,6 +24,7 @@
test_target=//build/bazel/scripts/difftool:difftool
b build "$test_target"
+b build -- "$test_target"
b build "$test_target" --run-soong-tests
b build --run-soong-tests "$test_target"
b --run-soong-tests build "$test_target"