Add support for preopt with uses-libraries
Required libraries are specified with LOCAL_USES_LIBRARIES
Optional libraries are specified with LOCAL_OPTIONAL_USES_LIBRARIES
The make rule cross references the libraries against what's stored
in the manifest.
Verification is enabled if LOCAL_ENFORCE_USES_LIBRARIES is true. This
defaults to true if either of LOCAL_USES_LIBRARIES or
LOCAL_OPTIONAL_USES_LIBRARIES are specified.
Bug: 70934104
Bug: 67345922
Test: manual
Change-Id: Ifca7d1a993620e9d0e42dc497a4a5d7a6c3f4172
diff --git a/core/config.mk b/core/config.mk
index 8a3e1f1..20dbddc 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -1026,6 +1026,10 @@
INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/hiddenapi-dark-greylist.txt
INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/hiddenapi-blacklist.txt
+# Missing optional uses-libraries so that the platform doesn't create build rules that depend on
+# them. See setup_one_odex.mk.
+INTERNAL_PLATFORM_MISSING_USES_LIBRARIES := com.google.android.ble com.google.android.wearable
+
# This is the standard way to name a directory containing prebuilt target
# objects. E.g., prebuilt/$(TARGET_PREBUILT_TAG)/libc.so
TARGET_PREBUILT_TAG := android-$(TARGET_ARCH)