Add NEED_AIDL_NDK_PLATFORM_BACKEND

The config variable is used to force the generation of the AIDL
ndk_platform backend which will eventually be removed in favor of the
ndk backend. The switch is needed as an escape hatch for some devices
whose BSP (outsourced and thus hardly modifiable) depends on the
ndk_backend libraries.

Bug: 161456198
Test: m
Change-Id: I62c995642b820419eaeedeee616c47aee1da251d
This commit is contained in:
Jiyong Park 2021-10-12 16:50:21 +09:00
parent 7b8f295e4c
commit ee29502db2
3 changed files with 21 additions and 42 deletions

View file

@ -271,6 +271,8 @@ $(call add_json_bool, SepolicySplit, $(filter true,$(PRODUCT_SEPOLICY_SPLIT)))
$(call add_json_list, SepolicyFreezeTestExtraDirs, $(SEPOLICY_FREEZE_TEST_EXTRA_DIRS))
$(call add_json_list, SepolicyFreezeTestExtraPrebuiltDirs, $(SEPOLICY_FREEZE_TEST_EXTRA_PREBUILT_DIRS))
$(call add_json_bool, GenerateAidlNdkPlatformBackend, $(filter true,$(NEED_AIDL_NDK_PLATFORM_BACKEND)))
$(call json_end)
$(file >$(SOONG_VARIABLES).tmp,$(json_contents))

View file

@ -50,11 +50,21 @@ else
_vndk_check_failure_message += " Run \`update-vndk-list.sh\` to update $(LATEST_VNDK_LIB_LIST)"
endif
# The *-ndk_platform.so libraries no longer exist and are removed from the VNDK set. However, they
# can exist if NEED_AIDL_NDK_PLATFORM_BACKEND is set to true for legacy devices. Don't be bothered
# with the extraneous libraries.
ifeq ($(NEED_AIDL_NDK_PLATFORM_BACKEND),true)
_READ_INTERNAL_VNDK_LIB_LIST := sed /ndk_platform.so/d $(INTERNAL_VNDK_LIB_LIST)
else
_READ_INTERNAL_VNDK_LIB_LIST := cat $(INTERNAL_VNDK_LIB_LIST)
endif
$(check-vndk-list-timestamp): $(INTERNAL_VNDK_LIB_LIST) $(LATEST_VNDK_LIB_LIST) $(HOST_OUT_EXECUTABLES)/update-vndk-list.sh
$(hide) ( diff --old-line-format="Removed %L" \
$(hide) ($(_READ_INTERNAL_VNDK_LIB_LIST) | \
diff --old-line-format="Removed %L" \
--new-line-format="Added %L" \
--unchanged-line-format="" \
$(LATEST_VNDK_LIB_LIST) $(INTERNAL_VNDK_LIB_LIST) \
$(LATEST_VNDK_LIB_LIST) - \
|| ( echo -e $(_vndk_check_failure_message); exit 1 ))
$(hide) mkdir -p $(dir $@)
$(hide) touch $@
@ -84,9 +94,13 @@ else
echo " echo Run lunch or choosecombo first" >> $@; \
echo " exit 1" >> $@; \
echo "fi" >> $@; \
echo "cd \$${ANDROID_BUILD_TOP}" >> $@; \
echo "cp $(PRIVATE_INTERNAL_VNDK_LIB_LIST) $(PRIVATE_LATEST_VNDK_LIB_LIST)" >> $@; \
echo "echo $(PRIVATE_LATEST_VNDK_LIB_LIST) updated." >> $@
echo "cd \$${ANDROID_BUILD_TOP}" >> $@
ifeq ($(NEED_AIDL_NDK_PLATFORM_BACKEND),true)
$(hide) echo "sed /ndk_platform.so/d $(PRIVATE_INTERNAL_VNDK_LIB_LIST) > $(PRIVATE_LATEST_VNDK_LIB_LIST)" >> $@
else
$(hide) echo "cp $(PRIVATE_INTERNAL_VNDK_LIB_LIST) $(PRIVATE_LATEST_VNDK_LIB_LIST)" >> $@
endif
$(hide) echo "echo $(PRIVATE_LATEST_VNDK_LIB_LIST) updated." >> $@
endif
@chmod a+x $@

View file

@ -19,16 +19,12 @@ LLNDK: libsync.so
LLNDK: libvndksupport.so
LLNDK: libvulkan.so
VNDK-SP: android.hardware.common-V2-ndk.so
VNDK-SP: android.hardware.common-V2-ndk_platform.so
VNDK-SP: android.hardware.common.fmq-V1-ndk.so
VNDK-SP: android.hardware.common.fmq-V1-ndk_platform.so
VNDK-SP: android.hardware.graphics.common-V3-ndk.so
VNDK-SP: android.hardware.graphics.common-V3-ndk_platform.so
VNDK-SP: android.hardware.graphics.common@1.0.so
VNDK-SP: android.hardware.graphics.common@1.1.so
VNDK-SP: android.hardware.graphics.common@1.2.so
VNDK-SP: android.hardware.graphics.composer3-V1-ndk.so
VNDK-SP: android.hardware.graphics.composer3-V1-ndk_platform.so
VNDK-SP: android.hardware.graphics.mapper@2.0.so
VNDK-SP: android.hardware.graphics.mapper@2.1.so
VNDK-SP: android.hardware.graphics.mapper@3.0.so
@ -63,88 +59,55 @@ VNDK-SP: libutilscallstack.so
VNDK-SP: libz.so
VNDK-core: android.hardware.audio.common@2.0.so
VNDK-core: android.hardware.authsecret-V1-ndk.so
VNDK-core: android.hardware.authsecret-V1-ndk_platform.so
VNDK-core: android.hardware.automotive.occupant_awareness-V1-ndk.so
VNDK-core: android.hardware.automotive.occupant_awareness-V1-ndk_platform.so
VNDK-core: android.hardware.configstore-utils.so
VNDK-core: android.hardware.configstore@1.0.so
VNDK-core: android.hardware.configstore@1.1.so
VNDK-core: android.hardware.confirmationui-support-lib.so
VNDK-core: android.hardware.gnss-V1-ndk.so
VNDK-core: android.hardware.gnss-V1-ndk_platform.so
VNDK-core: android.hardware.graphics.allocator@2.0.so
VNDK-core: android.hardware.graphics.allocator@3.0.so
VNDK-core: android.hardware.graphics.allocator@4.0.so
VNDK-core: android.hardware.graphics.bufferqueue@1.0.so
VNDK-core: android.hardware.graphics.bufferqueue@2.0.so
VNDK-core: android.hardware.health.storage-V1-ndk.so
VNDK-core: android.hardware.health.storage-V1-ndk_platform.so
VNDK-core: android.hardware.identity-V3-ndk.so
VNDK-core: android.hardware.identity-V3-ndk_platform.so
VNDK-core: android.hardware.keymaster-V3-ndk.so
VNDK-core: android.hardware.keymaster-V3-ndk_platform.so
VNDK-core: android.hardware.light-V1-ndk.so
VNDK-core: android.hardware.light-V1-ndk_platform.so
VNDK-core: android.hardware.media.bufferpool@2.0.so
VNDK-core: android.hardware.media.omx@1.0.so
VNDK-core: android.hardware.media@1.0.so
VNDK-core: android.hardware.memtrack-V1-ndk.so
VNDK-core: android.hardware.memtrack-V1-ndk_platform.so
VNDK-core: android.hardware.memtrack@1.0.so
VNDK-core: android.hardware.oemlock-V1-ndk.so
VNDK-core: android.hardware.oemlock-V1-ndk_platform.so
VNDK-core: android.hardware.power-V2-ndk.so
VNDK-core: android.hardware.power-V2-ndk_platform.so
VNDK-core: android.hardware.power.stats-V1-ndk.so
VNDK-core: android.hardware.power.stats-V1-ndk_platform.so
VNDK-core: android.hardware.radio-V1-ndk.so
VNDK-core: android.hardware.radio-V1-ndk_platform.so
VNDK-core: android.hardware.radio.config-V1-ndk.so
VNDK-core: android.hardware.radio.config-V1-ndk_platform.so
VNDK-core: android.hardware.radio.data-V1-ndk.so
VNDK-core: android.hardware.radio.data-V1-ndk_platform.so
VNDK-core: android.hardware.radio.messaging-V1-ndk.so
VNDK-core: android.hardware.radio.messaging-V1-ndk_platform.so
VNDK-core: android.hardware.radio.modem-V1-ndk.so
VNDK-core: android.hardware.radio.modem-V1-ndk_platform.so
VNDK-core: android.hardware.radio.network-V1-ndk.so
VNDK-core: android.hardware.radio.network-V1-ndk_platform.so
VNDK-core: android.hardware.radio.sim-V1-ndk.so
VNDK-core: android.hardware.radio.sim-V1-ndk_platform.so
VNDK-core: android.hardware.radio.voice-V1-ndk.so
VNDK-core: android.hardware.radio.voice-V1-ndk_platform.so
VNDK-core: android.hardware.rebootescrow-V1-ndk.so
VNDK-core: android.hardware.rebootescrow-V1-ndk_platform.so
VNDK-core: android.hardware.security.keymint-V1-ndk.so
VNDK-core: android.hardware.security.keymint-V1-ndk_platform.so
VNDK-core: android.hardware.security.secureclock-V1-ndk.so
VNDK-core: android.hardware.security.secureclock-V1-ndk_platform.so
VNDK-core: android.hardware.security.sharedsecret-V1-ndk.so
VNDK-core: android.hardware.security.sharedsecret-V1-ndk_platform.so
VNDK-core: android.hardware.soundtrigger3-V1-ndk.so
VNDK-core: android.hardware.soundtrigger3-V1-ndk_platform.so
VNDK-core: android.hardware.soundtrigger@2.0-core.so
VNDK-core: android.hardware.soundtrigger@2.0.so
VNDK-core: android.hardware.uwb-V1-ndk.so
VNDK-core: android.hardware.uwb-V1-ndk_platform.so
VNDK-core: android.hardware.uwb.fira_android-V1-ndk.so
VNDK-core: android.hardware.uwb.fira_android-V1-ndk_platform.so
VNDK-core: android.hardware.vibrator-V2-ndk.so
VNDK-core: android.hardware.vibrator-V2-ndk_platform.so
VNDK-core: android.hardware.weaver-V1-ndk.so
VNDK-core: android.hardware.weaver-V1-ndk_platform.so
VNDK-core: android.hardware.wifi.hostapd-V1-ndk.so
VNDK-core: android.hardware.wifi.hostapd-V1-ndk_platform.so
VNDK-core: android.hidl.token@1.0-utils.so
VNDK-core: android.hidl.token@1.0.so
VNDK-core: android.media.audio.common.types-V1-ndk.so
VNDK-core: android.media.audio.common.types-V1-ndk_platform.so
VNDK-core: android.media.soundtrigger.types-V1-ndk.so
VNDK-core: android.media.soundtrigger.types-V1-ndk_platform.so
VNDK-core: android.system.keystore2-V1-ndk.so
VNDK-core: android.system.keystore2-V1-ndk_platform.so
VNDK-core: android.system.suspend-V1-ndk.so
VNDK-core: android.system.suspend-V1-ndk_platform.so
VNDK-core: android.system.suspend@1.0.so
VNDK-core: libaudioroute.so
VNDK-core: libaudioutils.so