From 02b50d12bebf6ee932f3e86db0ac122e37f88a18 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 17 Sep 2019 14:47:55 -0700 Subject: [PATCH] Remove TARGET_TRANSLATE_2ND_ARCH TARGET_TRANSLATE_2ND_ARCH is never set to true any more, TARGET_NATIVE_BRIDGE_ARCH := arm is always used instead. Bug: 141242600 Test: m checkbuild Change-Id: Id3e0614a1d8a088d37929655b74fecd812606db2 --- core/base_rules.mk | 16 ---------------- core/dex_preopt_libart.mk | 8 ++------ core/envsetup.mk | 36 ------------------------------------ core/executable.mk | 9 --------- core/main.mk | 10 ---------- core/package.mk | 8 -------- core/prebuilt.mk | 7 ------- core/soong_cc_prebuilt.mk | 18 ------------------ core/soong_rust_prebuilt.mk | 19 ------------------- 9 files changed, 2 insertions(+), 129 deletions(-) diff --git a/core/base_rules.mk b/core/base_rules.mk index 7147f6df6..627038708 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -115,12 +115,6 @@ my_module_tags := $(LOCAL_MODULE_TAGS) ifeq ($(my_host_cross),true) my_module_tags := endif -ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) -ifdef LOCAL_2ND_ARCH_VAR_PREFIX -# Don't pull in modules by tags if this is for translation TARGET_2ND_ARCH. - my_module_tags := -endif -endif # Ninja has an implicit dependency on the command being run, and kati will # regenerate the ninja manifest if any read makefile changes, so there is no @@ -204,17 +198,7 @@ endif my_32_64_bit_suffix := $(if $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)IS_64_BIT),64,32) ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE)) -ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) -# When in TARGET_TRANSLATE_2ND_ARCH both TARGET_ARCH and TARGET_2ND_ARCH are 32-bit, -# to avoid path conflict we force using LOCAL_MODULE_PATH_64 for the first arch. -ifdef LOCAL_2ND_ARCH_VAR_PREFIX -my_multilib_module_path := $(LOCAL_MODULE_PATH_32) -else # ! LOCAL_2ND_ARCH_VAR_PREFIX -my_multilib_module_path := $(LOCAL_MODULE_PATH_64) -endif # ! LOCAL_2ND_ARCH_VAR_PREFIX -else # ! TARGET_TRANSLATE_2ND_ARCH my_multilib_module_path := $(strip $(LOCAL_MODULE_PATH_$(my_32_64_bit_suffix))) -endif # ! TARGET_TRANSLATE_2ND_ARCH ifdef my_multilib_module_path my_module_path := $(my_multilib_module_path) else diff --git a/core/dex_preopt_libart.mk b/core/dex_preopt_libart.mk index 85f2f3b2d..79d5f8cd8 100644 --- a/core/dex_preopt_libart.mk +++ b/core/dex_preopt_libart.mk @@ -21,10 +21,8 @@ $(my_installed): $(my_installed_vdex_dir)% : $(my_built_vdex_dir)% mkdir -p $(dir $@)/$(TARGET_ARCH) ln -sfn ../$(notdir $@) $(dir $@)/$(TARGET_ARCH) ifdef TARGET_2ND_ARCH - ifneq ($(TARGET_TRANSLATE_2ND_ARCH),true) mkdir -p $(dir $@)/$(TARGET_2ND_ARCH) ln -sfn ../$(notdir $@) $(dir $@)/$(TARGET_2ND_ARCH) - endif endif my_dexpreopt_image_extra_deps := $(firstword $(my_installed)) @@ -33,10 +31,8 @@ my_2nd_arch_prefix := include $(BUILD_SYSTEM)/dex_preopt_libart_boot.mk ifdef TARGET_2ND_ARCH - ifneq ($(TARGET_TRANSLATE_2ND_ARCH),true) - my_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX) - include $(BUILD_SYSTEM)/dex_preopt_libart_boot.mk - endif + my_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX) + include $(BUILD_SYSTEM)/dex_preopt_libart_boot.mk endif my_2nd_arch_prefix := diff --git a/core/envsetup.mk b/core/envsetup.mk index 88bf352c7..9901ee174 100644 --- a/core/envsetup.mk +++ b/core/envsetup.mk @@ -500,12 +500,7 @@ endif .KATI_READONLY := TARGET_OUT_SYSTEM_OTHER # Out for TARGET_2ND_ARCH -ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) -# With this you can reference the arm binary translation library with libfoo_arm in PRODUCT_PACKAGES. -TARGET_2ND_ARCH_MODULE_SUFFIX := _$(TARGET_2ND_ARCH) -else TARGET_2ND_ARCH_MODULE_SUFFIX := $(HOST_2ND_ARCH_MODULE_SUFFIX) -endif .KATI_READONLY := TARGET_2ND_ARCH_MODULE_SUFFIX ifneq ($(filter address,$(SANITIZE_TARGET)),) @@ -513,11 +508,7 @@ ifneq ($(filter address,$(SANITIZE_TARGET)),) else $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATES := $(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH) endif -ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) -$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES := $(target_out_shared_libraries_base)/lib/$(TARGET_2ND_ARCH) -else $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES := $(target_out_shared_libraries_base)/lib -endif $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_RENDERSCRIPT_BITCODE := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES) $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_EXECUTABLES := $(TARGET_OUT_EXECUTABLES) $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_APPS := $(TARGET_OUT_APPS) @@ -582,17 +573,10 @@ TARGET_OUT_DATA_FAKE := $(TARGET_OUT_DATA)/fake_packages $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_EXECUTABLES := $(TARGET_OUT_DATA_EXECUTABLES) $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_SHARED_LIBRARIES := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SHARED_LIBRARIES) $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_APPS := $(TARGET_OUT_DATA_APPS) -ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) -$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest/$(TARGET_2ND_ARCH) -$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest/$(TARGET_2ND_ARCH) -$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest/$(TARGET_2ND_ARCH)$(TARGET_VENDOR_TEST_SUFFIX) -$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest/$(TARGET_2ND_ARCH)$(TARGET_VENDOR_TEST_SUFFIX) -else $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest$(TARGET_VENDOR_TEST_SUFFIX) $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_METRIC_TESTS := $(TARGET_OUT_DATA)/benchmarktest$(TARGET_VENDOR_TEST_SUFFIX) -endif .KATI_READONLY := \ $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_EXECUTABLES \ $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_SHARED_LIBRARIES \ @@ -644,11 +628,7 @@ TARGET_OUT_VENDOR_ETC := $(TARGET_OUT_VENDOR)/etc TARGET_OUT_VENDOR_ETC $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_EXECUTABLES := $(TARGET_OUT_VENDOR_EXECUTABLES) -ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) -$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(target_out_vendor_shared_libraries_base)/lib/$(TARGET_2ND_ARCH) -else $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES := $(target_out_vendor_shared_libraries_base)/lib -endif $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_RENDERSCRIPT_BITCODE := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_SHARED_LIBRARIES) $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_APPS := $(TARGET_OUT_VENDOR_APPS) $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_VENDOR_APPS_PRIVILEGED := $(TARGET_OUT_VENDOR_APPS_PRIVILEGED) @@ -678,11 +658,7 @@ TARGET_OUT_OEM_ETC := $(TARGET_OUT_OEM)/etc TARGET_OUT_OEM_ETC $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_EXECUTABLES := $(TARGET_OUT_OEM_EXECUTABLES) -ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) -$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_SHARED_LIBRARIES := $(TARGET_OUT_OEM)/lib/$(TARGET_2ND_ARCH) -else $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_SHARED_LIBRARIES := $(TARGET_OUT_OEM)/lib -endif $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_APPS := $(TARGET_OUT_OEM_APPS) .KATI_READONLY := \ $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_OEM_EXECUTABLES \ @@ -728,11 +704,7 @@ TARGET_OUT_ODM_ETC := $(TARGET_OUT_ODM)/etc TARGET_OUT_ODM_ETC $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_EXECUTABLES := $(TARGET_OUT_ODM_EXECUTABLES) -ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) -$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_SHARED_LIBRARIES := $(target_out_odm_shared_libraries_base)/lib/$(TARGET_2ND_ARCH) -else $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_SHARED_LIBRARIES := $(target_out_odm_shared_libraries_base)/lib -endif $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_RENDERSCRIPT_BITCODE := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_SHARED_LIBRARIES) $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_APPS := $(TARGET_OUT_ODM_APPS) $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_ODM_APPS_PRIVILEGED := $(TARGET_OUT_ODM_APPS_PRIVILEGED) @@ -778,11 +750,7 @@ TARGET_OUT_PRODUCT_ETC := $(TARGET_OUT_PRODUCT)/etc TARGET_OUT_PRODUCT_ETC $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_EXECUTABLES := $(TARGET_OUT_PRODUCT_EXECUTABLES) -ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) -$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_SHARED_LIBRARIES := $(target_out_product_shared_libraries_base)/lib/$(TARGET_2ND_ARCH) -else $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_SHARED_LIBRARIES := $(target_out_product_shared_libraries_base)/lib -endif $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_APPS := $(TARGET_OUT_PRODUCT_APPS) $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_APPS_PRIVILEGED := $(TARGET_OUT_PRODUCT_APPS_PRIVILEGED) .KATI_READONLY := \ @@ -825,11 +793,7 @@ TARGET_OUT_SYSTEM_EXT_EXECUTABLES := $(TARGET_OUT_SYSTEM_EXT)/bin TARGET_OUT_SYSTEM_EXT_ETC $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_EXT_EXECUTABLES := $(TARGET_OUT_SYSTEM_EXT_EXECUTABLES) -ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) -$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_EXT_SHARED_LIBRARIES := $(target_out_system_ext_shared_libraries_base)/lib/$(TARGET_2ND_ARCH) -else $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_EXT_SHARED_LIBRARIES := $(target_out_system_ext_shared_libraries_base)/lib -endif $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_EXT_APPS := $(TARGET_OUT_SYSTEM_EXT_APPS) $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_EXT_APPS_PRIVILEGED := $(TARGET_OUT_SYSTEM_EXT_APPS_PRIVILEGED) .KATI_READONLY := \ diff --git a/core/executable.mk b/core/executable.mk index e71ff339b..c8d927262 100644 --- a/core/executable.mk +++ b/core/executable.mk @@ -20,15 +20,6 @@ endif ifneq (true,$(my_skip_this_target)) $(call record-module-type,EXECUTABLE) -ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) -# If a native test explicity specifies to build only for the translation arch, -# we'll still need LOCAL_MULTILIB=both and let module_arch_supported.mk choose -# to build only for TARGET_2ND_ARCH. -ifneq (1,$(words $(LOCAL_MODULE_TARGET_ARCH))) -LOCAL_MULTILIB := first -endif -endif - my_prefix := TARGET_ include $(BUILD_SYSTEM)/multilib.mk diff --git a/core/main.mk b/core/main.mk index 9eea513d6..b682a580e 100644 --- a/core/main.mk +++ b/core/main.mk @@ -494,7 +494,6 @@ CUSTOM_MODULES := \ # # Resolve the required module name to 32-bit or 64-bit variant. # Get a list of corresponding 32-bit module names, if one exists. -ifneq ($(TARGET_TRANSLATE_2ND_ARCH),true) define get-32-bit-modules $(sort $(foreach m,$(1),\ $(if $(ALL_MODULES.$(m)$(TARGET_2ND_ARCH_MODULE_SUFFIX).CLASS),\ @@ -508,15 +507,6 @@ $(sort $(foreach m,$(1),\ $(m)$(TARGET_2ND_ARCH_MODULE_SUFFIX), \ $(m)))) endef -else # TARGET_TRANSLATE_2ND_ARCH -# For binary translation config, by default only install the first arch. -define get-32-bit-modules -endef - -define get-32-bit-modules-if-we-can -$(strip $(1)) -endef -endif # TARGET_TRANSLATE_2ND_ARCH # TODO: we can probably check to see if these modules are actually host # modules diff --git a/core/package.mk b/core/package.mk index 854e0093c..6bde48553 100644 --- a/core/package.mk +++ b/core/package.mk @@ -7,14 +7,6 @@ $(call record-module-type,PACKAGE) my_prefix := TARGET_ include $(BUILD_SYSTEM)/multilib.mk -ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) - ifeq ($(TARGET_SUPPORTS_64_BIT_APPS),true) - my_module_multilib := first - else ifneq ($(my_module_multilib),64) - my_module_multilib := first - endif -endif - ifeq ($(TARGET_SUPPORTS_32_BIT_APPS)|$(TARGET_SUPPORTS_64_BIT_APPS),true|true) # packages default to building for either architecture, # the preferred if its supported, otherwise the non-preferred. diff --git a/core/prebuilt.mk b/core/prebuilt.mk index 9d284fb53..4512cd9e8 100644 --- a/core/prebuilt.mk +++ b/core/prebuilt.mk @@ -12,13 +12,6 @@ ifdef LOCAL_IS_HOST_MODULE LOCAL_HOST_PREFIX := else my_prefix := TARGET_ - - ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) - # Only support prebuilt shared and static libraries for translated arch - ifeq ($(filter SHARED_LIBRARIES STATIC_LIBRARIES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),) - LOCAL_MULTILIB := first - endif - endif endif include $(BUILD_SYSTEM)/multilib.mk diff --git a/core/soong_cc_prebuilt.mk b/core/soong_cc_prebuilt.mk index 34dd3e8d8..09eb419a1 100644 --- a/core/soong_cc_prebuilt.mk +++ b/core/soong_cc_prebuilt.mk @@ -31,20 +31,6 @@ else $(call pretty-error,Unsupported LOCAL_MODULE_$(my_prefix)ARCH=$(LOCAL_MODULE_$(my_prefix)ARCH)) endif -skip_module := -ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) - ifndef LOCAL_IS_HOST_MODULE - ifdef LOCAL_2ND_ARCH_VAR_PREFIX - # Only support shared and static libraries and tests for translated arch - ifeq ($(filter SHARED_LIBRARIES STATIC_LIBRARIES HEADER_LIBRARIES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),) - skip_module := true - endif - endif - endif -endif - -ifndef skip_module - # Don't install static libraries by default. ifndef LOCAL_UNINSTALLABLE_MODULE ifeq (STATIC_LIBRARIES,$(LOCAL_MODULE_CLASS)) @@ -233,7 +219,3 @@ installed_static_library_notice_file_targets := \ $(notice_target): | $(installed_static_library_notice_file_targets) $(LOCAL_INSTALLED_MODULE): | $(notice_target) - -endif # !skip_module - -skip_module := diff --git a/core/soong_rust_prebuilt.mk b/core/soong_rust_prebuilt.mk index ea4307845..23d18c4c1 100644 --- a/core/soong_rust_prebuilt.mk +++ b/core/soong_rust_prebuilt.mk @@ -28,21 +28,6 @@ else $(call pretty-error,Unsupported LOCAL_MODULE_$(my_prefix)ARCH=$(LOCAL_MODULE_$(my_prefix)ARCH)) endif -skip_module := -ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true) - ifndef LOCAL_IS_HOST_MODULE - ifdef LOCAL_2ND_ARCH_VAR_PREFIX - # Only support rlib and dylib libraries for translated arch - ifeq ($(filter RLIB_LIBRARIES DYLIB_LIBRARIES PROC_MACRO_LIBRARIES,$(LOCAL_MODULE_CLASS)),) - skip_module := true - endif - endif - endif -endif - - -ifndef skip_module - # Don't install rlib/proc_macro libraries. ifndef LOCAL_UNINSTALLABLE_MODULE ifneq ($(filter RLIB_LIBRARIES PROC_MACRO_LIBRARIES,$(LOCAL_MODULE_CLASS)),) @@ -121,7 +106,3 @@ installed_static_library_notice_file_targets += \ $(notice_target): | $(installed_static_library_notice_file_targets) $(LOCAL_INSTALLED_MODULE): | $(notice_target) -endif # !skip_module - -skip_module := -