From a1d6109978e0df6daab08b75707e06fcc23913c5 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 21 Feb 2023 11:36:20 -0800 Subject: [PATCH] Disable riscv64 dependency on bcc and ld.mc riscv64 can't build the device version of bcc and ld.mc due to a dependency on an old version of LLVM, but they are listed in base_system.mk which can't add them conditionally based on the target architecture. Add a hack to base_system.mk to silence the warning that the host-only modules are listed in PRODUCT_PACKAGES. This can be removed once renderscript is removed from the platform. Test: lunch aosp_riscv64-userdebug && m Change-Id: I8efd769a34b110dfb838f7016e029369cb9a0f01 --- core/main.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/main.mk b/core/main.mk index 3866037b4f..f6f48e76de 100644 --- a/core/main.mk +++ b/core/main.mk @@ -1345,6 +1345,13 @@ else ifdef FULL_BUILD $(if $(ALL_MODULES.$(m).INSTALLED),\ $(if $(filter-out $(HOST_OUT_ROOT)/%,$(ALL_MODULES.$(m).INSTALLED)),,\ $(m)))) + ifeq ($(TARGET_ARCH),riscv64) + # HACK: riscv64 can't build the device version of bcc and ld.mc due to a + # dependency on an old version of LLVM, but they are listed in + # base_system.mk which can't add them conditionally based on the target + # architecture. + _host_modules := $(filter-out bcc ld.mc,$(_host_modules)) + endif $(call maybe-print-list-and-error,$(sort $(_host_modules)),\ Host modules should be in PRODUCT_HOST_PACKAGES$(comma) not PRODUCT_PACKAGES) endif