From 4a901c6d41378029ff42f9d1644da7515b65ee8c Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Fri, 26 Apr 2019 07:51:12 -0700 Subject: [PATCH] Ignore vndk-* subdirectories in the library absence check. (cherry picked from commit 8222ce45dd0330d1699ba65e4673310f2fb5f836) Test: m systemimage Test: build_test on Forrest Bug: 132289438 Merged-In: I059c9d0edb78e52838a25cef0472807847d77417 Change-Id: I57359dc9f1aa2230acd3252118aaf41f42b7a913 --- core/Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/Makefile b/core/Makefile index 84707bc6f3..7228d573ef 100644 --- a/core/Makefile +++ b/core/Makefile @@ -2259,7 +2259,7 @@ endif # libprofile.so # libsigchain.so - cf_x86_phone-userdebug builds get this in system/lib/arm # libtombstoned_client.so -APEX_MODULE_LIBS= \ +APEX_MODULE_LIBS := \ libadbconnection.so \ libandroidicu.so \ libandroidio.so \ @@ -2290,7 +2290,10 @@ DISABLE_APEX_LIBS_ABSENCE_CHECK ?= # on the native architecture. # TODO(b/130630776): Introduce a make variable for the appropriate directory # when native bridge is active. -APEX_LIBS_ABSENCE_CHECK_EXCLUDE=lib/arm lib/arm64 +APEX_LIBS_ABSENCE_CHECK_EXCLUDE := lib/arm lib/arm64 + +# Exclude vndk-sp-* subdirectories which contain prebuilts from older releases. +APEX_LIBS_ABSENCE_CHECK_EXCLUDE += lib/vndk-% lib64/vndk-% # If the check below fails, some library has ended up in system/lib or # system/lib64 that is intended to only go into some APEX package. The likely @@ -2318,7 +2321,7 @@ define check-apex-libs-absence $(hide) ( \ cd $(TARGET_OUT) && \ findres=$$(find lib* \ - $(foreach dir,$(APEX_LIBS_ABSENCE_CHECK_EXCLUDE),-path $(dir) -prune -o) \ + $(foreach dir,$(APEX_LIBS_ABSENCE_CHECK_EXCLUDE),-path "$(subst %,*,$(dir))" -prune -o) \ -type f \( -false $(foreach lib,$(APEX_MODULE_LIBS),-o -name $(lib)) \) \ -print) && \ if [ -n "$$findres" ]; then \