Merge changes from topic "sanitizer-runtime-stubs"

* changes:
  Add version dependencies to sanitizer runtime dependencies
  Fix prebuilt library stubs
  Track allowed transitive deps in any updatable module.
This commit is contained in:
Colin Cross 2020-10-02 01:06:10 +00:00 committed by Gerrit Code Review
commit 973f46703b
9 changed files with 725 additions and 68 deletions

View File

@ -581,15 +581,15 @@ func (d *ApexBundleDepsInfo) BuildDepsInfoLists(ctx ModuleContext, minSdkVersion
var fullContent strings.Builder
var flatContent strings.Builder
fmt.Fprintf(&flatContent, "%s(minSdkVersion:%s):\\n", ctx.ModuleName(), minSdkVersion)
fmt.Fprintf(&fullContent, "%s(minSdkVersion:%s):\\n", ctx.ModuleName(), minSdkVersion)
for _, key := range FirstUniqueStrings(SortedStringKeys(depInfos)) {
info := depInfos[key]
toName := fmt.Sprintf("%s(minSdkVersion:%s)", info.To, info.MinSdkVersion)
if info.IsExternal {
toName = toName + " (external)"
}
fmt.Fprintf(&fullContent, "%s <- %s\\n", toName, strings.Join(SortedUniqueStrings(info.From), ", "))
fmt.Fprintf(&flatContent, " %s\\n", toName)
fmt.Fprintf(&fullContent, " %s <- %s\\n", toName, strings.Join(SortedUniqueStrings(info.From), ", "))
fmt.Fprintf(&flatContent, "%s\\n", toName)
}
d.fullListPath = PathForModuleOut(ctx, "depsinfo", "fulllist.txt").OutputPath

View File

@ -1 +1,4 @@
per-file * = jiyong@google.com
per-file * = jiyong@google.com
per-file allowed_deps.txt = set noparent
per-file allowed_deps.txt = dariofreni@google.com,hansson@google.com,harpin@google.com,jiyong@google.com,narayan@google.com,omakoto@google.com,jham@google.com

521
apex/allowed_deps.txt Normal file
View File

@ -0,0 +1,521 @@
# A list of allowed dependencies for all updatable modules.
#
# The list tracks all direct and transitive dependencies that end up within any
# of the updatable binaries; specifically excluding external dependencies
# required to compile those binaries. This prevents potential regressions in
# case a new dependency is not aware of the different functional and
# non-functional requirements being part of an updatable module, for example
# setting correct min_sdk_version.
#
# To update the list, run:
# repo-root$ build/soong/scripts/update-apex-allowed-deps.sh
#
# See go/apex-allowed-deps-error for more details.
# TODO(b/157465465): introduce automated quality signals and remove this list.
adbd(minSdkVersion:(no version))
android.hardware.cas.native@1.0(minSdkVersion:29)
android.hardware.cas@1.0(minSdkVersion:29)
android.hardware.common-ndk_platform(minSdkVersion:29)
android.hardware.graphics.allocator@2.0(minSdkVersion:29)
android.hardware.graphics.allocator@3.0(minSdkVersion:29)
android.hardware.graphics.allocator@4.0(minSdkVersion:29)
android.hardware.graphics.bufferqueue@1.0(minSdkVersion:29)
android.hardware.graphics.bufferqueue@2.0(minSdkVersion:29)
android.hardware.graphics.common-ndk_platform(minSdkVersion:29)
android.hardware.graphics.common@1.0(minSdkVersion:29)
android.hardware.graphics.common@1.1(minSdkVersion:29)
android.hardware.graphics.common@1.2(minSdkVersion:29)
android.hardware.graphics.mapper@2.0(minSdkVersion:29)
android.hardware.graphics.mapper@2.1(minSdkVersion:29)
android.hardware.graphics.mapper@3.0(minSdkVersion:29)
android.hardware.graphics.mapper@4.0(minSdkVersion:29)
android.hardware.media.bufferpool@2.0(minSdkVersion:29)
android.hardware.media.c2@1.0(minSdkVersion:29)
android.hardware.media.c2@1.1(minSdkVersion:29)
android.hardware.media.omx@1.0(minSdkVersion:29)
android.hardware.media@1.0(minSdkVersion:29)
android.hardware.neuralnetworks@1.0(minSdkVersion:30)
android.hardware.neuralnetworks@1.1(minSdkVersion:30)
android.hardware.neuralnetworks@1.2(minSdkVersion:30)
android.hardware.neuralnetworks@1.3(minSdkVersion:30)
android.hardware.tetheroffload.config-V1.0-java(minSdkVersion:current)
android.hardware.tetheroffload.control-V1.0-java(minSdkVersion:current)
android.hidl.allocator@1.0(minSdkVersion:29)
android.hidl.base-V1.0-java(minSdkVersion:current)
android.hidl.memory.token@1.0(minSdkVersion:29)
android.hidl.memory@1.0(minSdkVersion:29)
android.hidl.safe_union@1.0(minSdkVersion:29)
android.hidl.token@1.0(minSdkVersion:29)
android.hidl.token@1.0-utils(minSdkVersion:29)
android.net.ipsec.ike(minSdkVersion:current)
android.net.ipsec.ike.xml(minSdkVersion:(no version))
androidx-constraintlayout_constraintlayout(minSdkVersion:14)
androidx-constraintlayout_constraintlayout-solver(minSdkVersion:24)
androidx.activity_activity(minSdkVersion:14)
androidx.activity_activity-ktx(minSdkVersion:14)
androidx.annotation_annotation(minSdkVersion:24)
androidx.annotation_annotation(minSdkVersion:current)
androidx.appcompat_appcompat(minSdkVersion:14)
androidx.appcompat_appcompat-resources(minSdkVersion:14)
androidx.arch.core_core-common(minSdkVersion:24)
androidx.arch.core_core-common(minSdkVersion:current)
androidx.arch.core_core-runtime(minSdkVersion:14)
androidx.asynclayoutinflater_asynclayoutinflater(minSdkVersion:14)
androidx.autofill_autofill(minSdkVersion:14)
androidx.cardview_cardview(minSdkVersion:14)
androidx.collection_collection(minSdkVersion:24)
androidx.collection_collection(minSdkVersion:current)
androidx.collection_collection-ktx(minSdkVersion:24)
androidx.coordinatorlayout_coordinatorlayout(minSdkVersion:14)
androidx.core_core(minSdkVersion:14)
androidx.core_core-ktx(minSdkVersion:14)
androidx.cursoradapter_cursoradapter(minSdkVersion:14)
androidx.customview_customview(minSdkVersion:14)
androidx.documentfile_documentfile(minSdkVersion:14)
androidx.drawerlayout_drawerlayout(minSdkVersion:14)
androidx.fragment_fragment(minSdkVersion:14)
androidx.fragment_fragment-ktx(minSdkVersion:14)
androidx.interpolator_interpolator(minSdkVersion:14)
androidx.leanback_leanback(minSdkVersion:17)
androidx.leanback_leanback-preference(minSdkVersion:21)
androidx.legacy_legacy-preference-v14(minSdkVersion:14)
androidx.legacy_legacy-support-core-ui(minSdkVersion:14)
androidx.legacy_legacy-support-core-utils(minSdkVersion:14)
androidx.legacy_legacy-support-v13(minSdkVersion:14)
androidx.legacy_legacy-support-v4(minSdkVersion:14)
androidx.lifecycle_lifecycle-common(minSdkVersion:24)
androidx.lifecycle_lifecycle-common(minSdkVersion:current)
androidx.lifecycle_lifecycle-common-java8(minSdkVersion:24)
androidx.lifecycle_lifecycle-extensions(minSdkVersion:14)
androidx.lifecycle_lifecycle-livedata(minSdkVersion:14)
androidx.lifecycle_lifecycle-livedata-core(minSdkVersion:14)
androidx.lifecycle_lifecycle-livedata-core-ktx(minSdkVersion:14)
androidx.lifecycle_lifecycle-process(minSdkVersion:14)
androidx.lifecycle_lifecycle-runtime(minSdkVersion:14)
androidx.lifecycle_lifecycle-runtime-ktx(minSdkVersion:14)
androidx.lifecycle_lifecycle-service(minSdkVersion:14)
androidx.lifecycle_lifecycle-viewmodel(minSdkVersion:14)
androidx.lifecycle_lifecycle-viewmodel-ktx(minSdkVersion:14)
androidx.lifecycle_lifecycle-viewmodel-savedstate(minSdkVersion:14)
androidx.loader_loader(minSdkVersion:14)
androidx.localbroadcastmanager_localbroadcastmanager(minSdkVersion:14)
androidx.media_media(minSdkVersion:14)
androidx.navigation_navigation-common(minSdkVersion:14)
androidx.navigation_navigation-common-ktx(minSdkVersion:14)
androidx.navigation_navigation-fragment(minSdkVersion:14)
androidx.navigation_navigation-fragment-ktx(minSdkVersion:14)
androidx.navigation_navigation-runtime(minSdkVersion:14)
androidx.navigation_navigation-runtime-ktx(minSdkVersion:14)
androidx.navigation_navigation-ui(minSdkVersion:14)
androidx.navigation_navigation-ui-ktx(minSdkVersion:14)
androidx.preference_preference(minSdkVersion:14)
androidx.print_print(minSdkVersion:14)
androidx.recyclerview_recyclerview(minSdkVersion:14)
androidx.recyclerview_recyclerview-selection(minSdkVersion:14)
androidx.savedstate_savedstate(minSdkVersion:14)
androidx.slidingpanelayout_slidingpanelayout(minSdkVersion:14)
androidx.swiperefreshlayout_swiperefreshlayout(minSdkVersion:14)
androidx.transition_transition(minSdkVersion:14)
androidx.vectordrawable_vectordrawable(minSdkVersion:14)
androidx.vectordrawable_vectordrawable-animated(minSdkVersion:14)
androidx.versionedparcelable_versionedparcelable(minSdkVersion:14)
androidx.viewpager_viewpager(minSdkVersion:14)
apache-commons-compress(minSdkVersion:current)
art.module.public.api.stubs(minSdkVersion:(no version))
bcm_object(minSdkVersion:29)
boringssl_self_test(minSdkVersion:29)
bouncycastle_ike_digests(minSdkVersion:current)
brotli-java(minSdkVersion:current)
captiveportal-lib(minSdkVersion:29)
car-ui-lib(minSdkVersion:28)
CellBroadcastApp(minSdkVersion:29)
CellBroadcastServiceModule(minSdkVersion:29)
codecs_g711dec(minSdkVersion:29)
com.google.android.material_material(minSdkVersion:14)
conscrypt(minSdkVersion:29)
conscrypt.module.platform.api.stubs(minSdkVersion:(no version))
conscrypt.module.public.api.stubs(minSdkVersion:(no version))
core-lambda-stubs(minSdkVersion:(no version))
core.current.stubs(minSdkVersion:(no version))
crtbegin_dynamic(minSdkVersion:apex_inherit)
crtbegin_dynamic1(minSdkVersion:apex_inherit)
crtbegin_so(minSdkVersion:apex_inherit)
crtbegin_so1(minSdkVersion:apex_inherit)
crtbrand(minSdkVersion:apex_inherit)
crtend_android(minSdkVersion:apex_inherit)
crtend_so(minSdkVersion:apex_inherit)
datastallprotosnano(minSdkVersion:29)
derive_sdk(minSdkVersion:current)
derive_sdk_prefer32(minSdkVersion:current)
dnsresolver_aidl_interface-unstable-ndk_platform(minSdkVersion:29)
DocumentsUI-res-lib(minSdkVersion:29)
exoplayer2-extractor(minSdkVersion:16)
exoplayer2-extractor-annotation-stubs(minSdkVersion:16)
ExtServices(minSdkVersion:current)
ExtServices-core(minSdkVersion:current)
flatbuffer_headers(minSdkVersion:(no version))
fmtlib(minSdkVersion:29)
framework-permission(minSdkVersion:current)
framework-sdkextensions(minSdkVersion:current)
framework-statsd(minSdkVersion:current)
framework-tethering(minSdkVersion:current)
gemmlowp_headers(minSdkVersion:(no version))
GoogleCellBroadcastApp(minSdkVersion:29)
GoogleCellBroadcastServiceModule(minSdkVersion:29)
GoogleExtServices(minSdkVersion:current)
GooglePermissionController(minSdkVersion:28)
guava(minSdkVersion:current)
gwp_asan_headers(minSdkVersion:(no version))
i18n.module.public.api.stubs(minSdkVersion:(no version))
iconloader(minSdkVersion:21)
ike-internals(minSdkVersion:current)
InProcessTethering(minSdkVersion:current)
ipmemorystore-aidl-interfaces-java(minSdkVersion:29)
ipmemorystore-aidl-interfaces-unstable-java(minSdkVersion:29)
jni_headers(minSdkVersion:29)
jsr305(minSdkVersion:14)
kotlinx-coroutines-android(minSdkVersion:current)
kotlinx-coroutines-core(minSdkVersion:current)
legacy.art.module.platform.api.stubs(minSdkVersion:(no version))
legacy.core.platform.api.stubs(minSdkVersion:(no version))
legacy.i18n.module.platform.api.stubs(minSdkVersion:(no version))
libaacextractor(minSdkVersion:29)
libadb_crypto(minSdkVersion:(no version))
libadb_pairing_auth(minSdkVersion:(no version))
libadb_pairing_connection(minSdkVersion:(no version))
libadb_pairing_server(minSdkVersion:(no version))
libadb_protos(minSdkVersion:(no version))
libadb_tls_connection(minSdkVersion:(no version))
libadbconnection_client(minSdkVersion:(no version))
libadbconnection_server(minSdkVersion:(no version))
libadbd(minSdkVersion:(no version))
libadbd_core(minSdkVersion:(no version))
libadbd_services(minSdkVersion:(no version))
libamrextractor(minSdkVersion:29)
libapp_processes_protos_lite(minSdkVersion:(no version))
libarect(minSdkVersion:29)
libasyncio(minSdkVersion:(no version))
libatomic(minSdkVersion:(no version))
libaudio_system_headers(minSdkVersion:29)
libaudioclient_headers(minSdkVersion:29)
libaudiofoundation_headers(minSdkVersion:29)
libaudioutils(minSdkVersion:29)
libaudioutils_fixedfft(minSdkVersion:29)
libavcdec(minSdkVersion:29)
libavcenc(minSdkVersion:29)
libavservices_minijail(minSdkVersion:29)
libbacktrace_headers(minSdkVersion:apex_inherit)
libbase(minSdkVersion:29)
libbase_headers(minSdkVersion:29)
libbinder_headers(minSdkVersion:29)
libbinderthreadstateutils(minSdkVersion:29)
libbluetooth-types-header(minSdkVersion:29)
libbrotli(minSdkVersion:(no version))
libbuildversion(minSdkVersion:(no version))
libc(minSdkVersion:(no version))
libc++(minSdkVersion:apex_inherit)
libc++_static(minSdkVersion:apex_inherit)
libc++abi(minSdkVersion:apex_inherit)
libc++demangle(minSdkVersion:apex_inherit)
libc_headers(minSdkVersion:apex_inherit)
libc_headers_arch(minSdkVersion:apex_inherit)
libcap(minSdkVersion:29)
libcodec2(minSdkVersion:29)
libcodec2_headers(minSdkVersion:29)
libcodec2_hidl@1.0(minSdkVersion:29)
libcodec2_hidl@1.1(minSdkVersion:29)
libcodec2_internal(minSdkVersion:29)
libcodec2_soft_aacdec(minSdkVersion:29)
libcodec2_soft_aacenc(minSdkVersion:29)
libcodec2_soft_amrnbdec(minSdkVersion:29)
libcodec2_soft_amrnbenc(minSdkVersion:29)
libcodec2_soft_amrwbdec(minSdkVersion:29)
libcodec2_soft_amrwbenc(minSdkVersion:29)
libcodec2_soft_av1dec_gav1(minSdkVersion:29)
libcodec2_soft_avcdec(minSdkVersion:29)
libcodec2_soft_avcenc(minSdkVersion:29)
libcodec2_soft_common(minSdkVersion:29)
libcodec2_soft_flacdec(minSdkVersion:29)
libcodec2_soft_flacenc(minSdkVersion:29)
libcodec2_soft_g711alawdec(minSdkVersion:29)
libcodec2_soft_g711mlawdec(minSdkVersion:29)
libcodec2_soft_gsmdec(minSdkVersion:29)
libcodec2_soft_h263dec(minSdkVersion:29)
libcodec2_soft_h263enc(minSdkVersion:29)
libcodec2_soft_hevcdec(minSdkVersion:29)
libcodec2_soft_hevcenc(minSdkVersion:29)
libcodec2_soft_mp3dec(minSdkVersion:29)
libcodec2_soft_mpeg2dec(minSdkVersion:29)
libcodec2_soft_mpeg4dec(minSdkVersion:29)
libcodec2_soft_mpeg4enc(minSdkVersion:29)
libcodec2_soft_opusdec(minSdkVersion:29)
libcodec2_soft_opusenc(minSdkVersion:29)
libcodec2_soft_rawdec(minSdkVersion:29)
libcodec2_soft_vorbisdec(minSdkVersion:29)
libcodec2_soft_vp8dec(minSdkVersion:29)
libcodec2_soft_vp8enc(minSdkVersion:29)
libcodec2_soft_vp9dec(minSdkVersion:29)
libcodec2_soft_vp9enc(minSdkVersion:29)
libcodec2_vndk(minSdkVersion:29)
libcrypto(minSdkVersion:29)
libcrypto_static(minSdkVersion:(no version))
libcrypto_utils(minSdkVersion:(no version))
libcutils(minSdkVersion:29)
libcutils_headers(minSdkVersion:29)
libcutils_sockets(minSdkVersion:29)
libdiagnose_usb(minSdkVersion:(no version))
libdl(minSdkVersion:(no version))
libeigen(minSdkVersion:(no version))
libfifo(minSdkVersion:29)
libFLAC(minSdkVersion:29)
libFLAC-config(minSdkVersion:29)
libFLAC-headers(minSdkVersion:29)
libflacextractor(minSdkVersion:29)
libfmq(minSdkVersion:29)
libFraunhoferAAC(minSdkVersion:29)
libgav1(minSdkVersion:29)
libgcc_stripped(minSdkVersion:(no version))
libgralloctypes(minSdkVersion:29)
libgrallocusage(minSdkVersion:29)
libgsm(minSdkVersion:apex_inherit)
libgtest_prod(minSdkVersion:apex_inherit)
libgui_bufferqueue_static(minSdkVersion:29)
libgui_headers(minSdkVersion:29)
libhardware(minSdkVersion:29)
libhardware_headers(minSdkVersion:29)
libhevcdec(minSdkVersion:29)
libhevcenc(minSdkVersion:29)
libhidlbase(minSdkVersion:29)
libhidlmemory(minSdkVersion:29)
libhwbinder-impl-internal(minSdkVersion:29)
libion(minSdkVersion:29)
libjavacrypto(minSdkVersion:29)
libjsoncpp(minSdkVersion:29)
libLibGuiProperties(minSdkVersion:29)
liblog(minSdkVersion:(no version))
liblog_headers(minSdkVersion:29)
liblua(minSdkVersion:(no version))
liblz4(minSdkVersion:(no version))
libm(minSdkVersion:(no version))
libmath(minSdkVersion:29)
libmdnssd(minSdkVersion:(no version))
libmedia_codecserviceregistrant(minSdkVersion:29)
libmedia_datasource_headers(minSdkVersion:29)
libmedia_headers(minSdkVersion:29)
libmedia_helper_headers(minSdkVersion:29)
libmedia_midiiowrapper(minSdkVersion:29)
libmidiextractor(minSdkVersion:29)
libminijail(minSdkVersion:29)
libminijail_gen_constants(minSdkVersion:(no version))
libminijail_gen_constants_obj(minSdkVersion:29)
libminijail_gen_syscall(minSdkVersion:(no version))
libminijail_gen_syscall_obj(minSdkVersion:29)
libminijail_generated(minSdkVersion:29)
libmkvextractor(minSdkVersion:29)
libmp3extractor(minSdkVersion:29)
libmp4extractor(minSdkVersion:29)
libmpeg2dec(minSdkVersion:29)
libmpeg2extractor(minSdkVersion:29)
libnativebase_headers(minSdkVersion:29)
libnativehelper_compat_libc++(minSdkVersion:(no version))
libnativehelper_header_only(minSdkVersion:29)
libnativewindow_headers(minSdkVersion:29)
libnetd_resolv(minSdkVersion:29)
libnetdbinder_utils_headers(minSdkVersion:29)
libnetdutils(minSdkVersion:29)
libnetworkstackutilsjni(minSdkVersion:29)
libneuralnetworks(minSdkVersion:(no version))
libneuralnetworks_common(minSdkVersion:(no version))
libneuralnetworks_headers(minSdkVersion:(no version))
liboggextractor(minSdkVersion:29)
libopus(minSdkVersion:29)
libprocessgroup(minSdkVersion:29)
libprocessgroup_headers(minSdkVersion:29)
libprocpartition(minSdkVersion:(no version))
libprotobuf-cpp-lite(minSdkVersion:29)
libprotobuf-java-lite(minSdkVersion:current)
libprotobuf-java-nano(minSdkVersion:9)
libprotoutil(minSdkVersion:(no version))
libqemu_pipe(minSdkVersion:(no version))
libsfplugin_ccodec_utils(minSdkVersion:29)
libsonivoxwithoutjet(minSdkVersion:29)
libspeexresampler(minSdkVersion:29)
libssl(minSdkVersion:29)
libstagefright_amrnb_common(minSdkVersion:29)
libstagefright_amrnbdec(minSdkVersion:29)
libstagefright_amrnbenc(minSdkVersion:29)
libstagefright_amrwbdec(minSdkVersion:29)
libstagefright_amrwbenc(minSdkVersion:29)
libstagefright_bufferpool@2.0.1(minSdkVersion:29)
libstagefright_bufferqueue_helper(minSdkVersion:29)
libstagefright_enc_common(minSdkVersion:29)
libstagefright_esds(minSdkVersion:29)
libstagefright_flacdec(minSdkVersion:29)
libstagefright_foundation(minSdkVersion:29)
libstagefright_foundation_headers(minSdkVersion:29)
libstagefright_foundation_without_imemory(minSdkVersion:29)
libstagefright_headers(minSdkVersion:29)
libstagefright_id3(minSdkVersion:29)
libstagefright_m4vh263dec(minSdkVersion:29)
libstagefright_m4vh263enc(minSdkVersion:29)
libstagefright_metadatautils(minSdkVersion:29)
libstagefright_mp3dec(minSdkVersion:29)
libstagefright_mpeg2extractor(minSdkVersion:29)
libstagefright_mpeg2support_nocrypto(minSdkVersion:29)
libstats_jni(minSdkVersion:(no version))
libstatslog_resolv(minSdkVersion:29)
libstatslog_statsd(minSdkVersion:(no version))
libstatspull(minSdkVersion:(no version))
libstatspush_compat(minSdkVersion:29)
libstatssocket(minSdkVersion:(no version))
libstatssocket_headers(minSdkVersion:29)
libsystem_headers(minSdkVersion:apex_inherit)
libsysutils(minSdkVersion:apex_inherit)
libtetherutilsjni(minSdkVersion:current)
libtextclassifier(minSdkVersion:(no version))
libtextclassifier-java(minSdkVersion:current)
libtextclassifier_hash_headers(minSdkVersion:(no version))
libtextclassifier_hash_static(minSdkVersion:(no version))
libtflite_kernel_utils(minSdkVersion:(no version))
libtflite_static(minSdkVersion:(no version))
libui(minSdkVersion:29)
libui_headers(minSdkVersion:29)
libunwind_llvm(minSdkVersion:apex_inherit)
libutf(minSdkVersion:(no version))
libutils(minSdkVersion:apex_inherit)
libutils_headers(minSdkVersion:apex_inherit)
libvorbisidec(minSdkVersion:29)
libvpx(minSdkVersion:29)
libwatchdog(minSdkVersion:29)
libwavextractor(minSdkVersion:29)
libwebm(minSdkVersion:29)
libyuv(minSdkVersion:29)
libyuv_static(minSdkVersion:29)
libzstd(minSdkVersion:(no version))
media_ndk_headers(minSdkVersion:29)
media_plugin_headers(minSdkVersion:29)
mediaswcodec(minSdkVersion:29)
metrics-constants-protos(minSdkVersion:29)
ndk_crtbegin_so.19(minSdkVersion:(no version))
ndk_crtbegin_so.21(minSdkVersion:(no version))
ndk_crtbegin_so.27(minSdkVersion:(no version))
ndk_crtend_so.19(minSdkVersion:(no version))
ndk_crtend_so.21(minSdkVersion:(no version))
ndk_crtend_so.27(minSdkVersion:(no version))
ndk_libc++_static(minSdkVersion:(no version))
ndk_libc++abi(minSdkVersion:(no version))
net-utils-framework-common(minSdkVersion:current)
netd_aidl_interface-unstable-java(minSdkVersion:29)
netd_event_listener_interface-ndk_platform(minSdkVersion:29)
netlink-client(minSdkVersion:29)
networkstack-aidl-interfaces-unstable-java(minSdkVersion:29)
networkstack-client(minSdkVersion:29)
NetworkStackApiStableDependencies(minSdkVersion:29)
NetworkStackApiStableLib(minSdkVersion:29)
networkstackprotos(minSdkVersion:29)
PermissionController(minSdkVersion:28)
permissioncontroller-statsd(minSdkVersion:current)
philox_random(minSdkVersion:(no version))
philox_random_headers(minSdkVersion:(no version))
prebuilt_androidx-constraintlayout_constraintlayout-nodeps(minSdkVersion:(no version))
prebuilt_androidx-constraintlayout_constraintlayout-solver-nodeps(minSdkVersion:current)
prebuilt_androidx.activity_activity-ktx-nodeps(minSdkVersion:(no version))
prebuilt_androidx.activity_activity-nodeps(minSdkVersion:(no version))
prebuilt_androidx.annotation_annotation-nodeps(minSdkVersion:current)
prebuilt_androidx.appcompat_appcompat-nodeps(minSdkVersion:(no version))
prebuilt_androidx.appcompat_appcompat-resources-nodeps(minSdkVersion:(no version))
prebuilt_androidx.arch.core_core-common-nodeps(minSdkVersion:current)
prebuilt_androidx.arch.core_core-runtime-nodeps(minSdkVersion:(no version))
prebuilt_androidx.asynclayoutinflater_asynclayoutinflater-nodeps(minSdkVersion:(no version))
prebuilt_androidx.autofill_autofill-nodeps(minSdkVersion:(no version))
prebuilt_androidx.cardview_cardview-nodeps(minSdkVersion:(no version))
prebuilt_androidx.collection_collection-ktx-nodeps(minSdkVersion:current)
prebuilt_androidx.collection_collection-nodeps(minSdkVersion:current)
prebuilt_androidx.coordinatorlayout_coordinatorlayout-nodeps(minSdkVersion:(no version))
prebuilt_androidx.core_core-ktx-nodeps(minSdkVersion:(no version))
prebuilt_androidx.core_core-nodeps(minSdkVersion:(no version))
prebuilt_androidx.cursoradapter_cursoradapter-nodeps(minSdkVersion:(no version))
prebuilt_androidx.customview_customview-nodeps(minSdkVersion:(no version))
prebuilt_androidx.documentfile_documentfile-nodeps(minSdkVersion:(no version))
prebuilt_androidx.drawerlayout_drawerlayout-nodeps(minSdkVersion:(no version))
prebuilt_androidx.fragment_fragment-ktx-nodeps(minSdkVersion:(no version))
prebuilt_androidx.fragment_fragment-nodeps(minSdkVersion:(no version))
prebuilt_androidx.interpolator_interpolator-nodeps(minSdkVersion:(no version))
prebuilt_androidx.leanback_leanback-nodeps(minSdkVersion:(no version))
prebuilt_androidx.leanback_leanback-preference-nodeps(minSdkVersion:(no version))
prebuilt_androidx.legacy_legacy-support-core-ui-nodeps(minSdkVersion:(no version))
prebuilt_androidx.legacy_legacy-support-core-utils-nodeps(minSdkVersion:(no version))
prebuilt_androidx.legacy_legacy-support-v13-nodeps(minSdkVersion:(no version))
prebuilt_androidx.lifecycle_lifecycle-common-java8-nodeps(minSdkVersion:current)
prebuilt_androidx.lifecycle_lifecycle-common-nodeps(minSdkVersion:current)
prebuilt_androidx.lifecycle_lifecycle-extensions-nodeps(minSdkVersion:(no version))
prebuilt_androidx.lifecycle_lifecycle-livedata-core-ktx-nodeps(minSdkVersion:(no version))
prebuilt_androidx.lifecycle_lifecycle-livedata-core-nodeps(minSdkVersion:(no version))
prebuilt_androidx.lifecycle_lifecycle-livedata-nodeps(minSdkVersion:(no version))
prebuilt_androidx.lifecycle_lifecycle-process-nodeps(minSdkVersion:(no version))
prebuilt_androidx.lifecycle_lifecycle-runtime-ktx-nodeps(minSdkVersion:(no version))
prebuilt_androidx.lifecycle_lifecycle-runtime-nodeps(minSdkVersion:(no version))
prebuilt_androidx.lifecycle_lifecycle-service-nodeps(minSdkVersion:(no version))
prebuilt_androidx.lifecycle_lifecycle-viewmodel-ktx-nodeps(minSdkVersion:(no version))
prebuilt_androidx.lifecycle_lifecycle-viewmodel-nodeps(minSdkVersion:(no version))
prebuilt_androidx.lifecycle_lifecycle-viewmodel-savedstate-nodeps(minSdkVersion:(no version))
prebuilt_androidx.loader_loader-nodeps(minSdkVersion:(no version))
prebuilt_androidx.localbroadcastmanager_localbroadcastmanager-nodeps(minSdkVersion:(no version))
prebuilt_androidx.media_media-nodeps(minSdkVersion:(no version))
prebuilt_androidx.navigation_navigation-common-ktx-nodeps(minSdkVersion:(no version))
prebuilt_androidx.navigation_navigation-common-nodeps(minSdkVersion:(no version))
prebuilt_androidx.navigation_navigation-fragment-ktx-nodeps(minSdkVersion:(no version))
prebuilt_androidx.navigation_navigation-fragment-nodeps(minSdkVersion:(no version))
prebuilt_androidx.navigation_navigation-runtime-ktx-nodeps(minSdkVersion:(no version))
prebuilt_androidx.navigation_navigation-runtime-nodeps(minSdkVersion:(no version))
prebuilt_androidx.navigation_navigation-ui-ktx-nodeps(minSdkVersion:(no version))
prebuilt_androidx.navigation_navigation-ui-nodeps(minSdkVersion:(no version))
prebuilt_androidx.preference_preference-nodeps(minSdkVersion:(no version))
prebuilt_androidx.print_print-nodeps(minSdkVersion:(no version))
prebuilt_androidx.recyclerview_recyclerview-nodeps(minSdkVersion:(no version))
prebuilt_androidx.recyclerview_recyclerview-selection-nodeps(minSdkVersion:(no version))
prebuilt_androidx.savedstate_savedstate-nodeps(minSdkVersion:(no version))
prebuilt_androidx.slidingpanelayout_slidingpanelayout-nodeps(minSdkVersion:(no version))
prebuilt_androidx.swiperefreshlayout_swiperefreshlayout-nodeps(minSdkVersion:(no version))
prebuilt_androidx.transition_transition-nodeps(minSdkVersion:(no version))
prebuilt_androidx.vectordrawable_vectordrawable-animated-nodeps(minSdkVersion:(no version))
prebuilt_androidx.vectordrawable_vectordrawable-nodeps(minSdkVersion:(no version))
prebuilt_androidx.versionedparcelable_versionedparcelable-nodeps(minSdkVersion:(no version))
prebuilt_androidx.viewpager_viewpager-nodeps(minSdkVersion:(no version))
prebuilt_com.google.android.material_material-nodeps(minSdkVersion:(no version))
prebuilt_error_prone_annotations(minSdkVersion:(no version))
prebuilt_kotlin-stdlib(minSdkVersion:current)
prebuilt_kotlinx-coroutines-android-nodeps(minSdkVersion:(no version))
prebuilt_kotlinx-coroutines-core-nodeps(minSdkVersion:(no version))
prebuilt_libclang_rt.builtins-aarch64-android(minSdkVersion:(no version))
prebuilt_libclang_rt.builtins-arm-android(minSdkVersion:(no version))
prebuilt_libclang_rt.builtins-i686-android(minSdkVersion:(no version))
prebuilt_libclang_rt.builtins-x86_64-android(minSdkVersion:(no version))
prebuilt_test_framework-sdkextensions(minSdkVersion:(no version))
server_configurable_flags(minSdkVersion:29)
service-permission(minSdkVersion:current)
service-statsd(minSdkVersion:current)
SettingsLibActionBarShadow(minSdkVersion:21)
SettingsLibAppPreference(minSdkVersion:21)
SettingsLibBarChartPreference(minSdkVersion:21)
SettingsLibHelpUtils(minSdkVersion:21)
SettingsLibLayoutPreference(minSdkVersion:21)
SettingsLibProgressBar(minSdkVersion:21)
SettingsLibRestrictedLockUtils(minSdkVersion:21)
SettingsLibSearchWidget(minSdkVersion:21)
SettingsLibSettingsTheme(minSdkVersion:21)
SettingsLibUtils(minSdkVersion:21)
stats_proto(minSdkVersion:29)
statsd(minSdkVersion:(no version))
statsd-aidl-ndk_platform(minSdkVersion:(no version))
statsprotos(minSdkVersion:29)
tensorflow_headers(minSdkVersion:(no version))
Tethering(minSdkVersion:current)
TetheringApiCurrentLib(minSdkVersion:current)
TetheringGoogle(minSdkVersion:current)
textclassifier-statsd(minSdkVersion:current)
TextClassifierNotificationLibNoManifest(minSdkVersion:29)
TextClassifierServiceLibNoManifest(minSdkVersion:28)
updatable-media(minSdkVersion:29)
xz-java(minSdkVersion:current)

View File

@ -17,9 +17,9 @@
package apex
import (
"github.com/google/blueprint"
"android/soong/android"
"github.com/google/blueprint"
)
func init() {
@ -27,39 +27,79 @@ func init() {
}
type apexDepsInfoSingleton struct {
// Output file with all flatlists from updatable modules' deps-info combined
updatableFlatListsPath android.OutputPath
allowedApexDepsInfoCheckResult android.OutputPath
}
func apexDepsInfoSingletonFactory() android.Singleton {
return &apexDepsInfoSingleton{}
}
var combineFilesRule = pctx.AndroidStaticRule("combineFilesRule",
blueprint.RuleParams{
Command: "cat $out.rsp | xargs cat > $out",
var (
// Generate new apex allowed_deps.txt by merging all internal dependencies.
generateApexDepsInfoFilesRule = pctx.AndroidStaticRule("generateApexDepsInfoFilesRule", blueprint.RuleParams{
Command: "cat $out.rsp | xargs cat" +
// Only track non-external dependencies, i.e. those that end up in the binary
" | grep -v '(external)'" +
// Ignore comments in any of the files
" | grep -v '^#'" +
" | sort -u -f >$out",
Rspfile: "$out.rsp",
RspfileContent: "$in",
},
})
// Diff two given lists while ignoring comments in the allowed deps file.
diffAllowedApexDepsInfoRule = pctx.AndroidStaticRule("diffAllowedApexDepsInfoRule", blueprint.RuleParams{
Description: "Diff ${allowed_deps} and ${new_allowed_deps}",
Command: `
if grep -v '^#' ${allowed_deps} | diff -B - ${new_allowed_deps}; then
touch ${out};
else
echo -e "\n******************************";
echo "ERROR: go/apex-allowed-deps-error";
echo "******************************";
echo "Detected changes to allowed dependencies in updatable modules.";
echo "To fix and update build/soong/apex/allowed_deps.txt, please run:";
echo "$$ (croot && build/soong/scripts/update-apex-allowed-deps.sh)";
echo "Members of mainline-modularization@google.com will review the changes.";
echo -e "******************************\n";
exit 1;
fi;
`,
}, "allowed_deps", "new_allowed_deps")
)
func (s *apexDepsInfoSingleton) GenerateBuildActions(ctx android.SingletonContext) {
updatableFlatLists := android.Paths{}
ctx.VisitAllModules(func(module android.Module) {
if binaryInfo, ok := module.(android.ApexBundleDepsInfoIntf); ok {
if path := binaryInfo.FlatListPath(); path != nil {
if binaryInfo.Updatable() {
updatableFlatLists = append(updatableFlatLists, path)
}
if path := binaryInfo.FlatListPath(); path != nil && binaryInfo.Updatable() {
updatableFlatLists = append(updatableFlatLists, path)
}
}
})
s.updatableFlatListsPath = android.PathForOutput(ctx, "apex", "depsinfo", "updatable-flatlists.txt")
allowedDeps := android.ExistentPathForSource(ctx, "build/soong/apex/allowed_deps.txt").Path()
newAllowedDeps := android.PathForOutput(ctx, "apex", "depsinfo", "new-allowed-deps.txt")
ctx.Build(pctx, android.BuildParams{
Rule: combineFilesRule,
Description: "Generate " + s.updatableFlatListsPath.String(),
Inputs: updatableFlatLists,
Output: s.updatableFlatListsPath,
Rule: generateApexDepsInfoFilesRule,
Inputs: append(updatableFlatLists, allowedDeps),
Output: newAllowedDeps,
})
s.allowedApexDepsInfoCheckResult = android.PathForOutput(ctx, newAllowedDeps.Rel()+".check")
ctx.Build(pctx, android.BuildParams{
Rule: diffAllowedApexDepsInfoRule,
Input: newAllowedDeps,
Output: s.allowedApexDepsInfoCheckResult,
Args: map[string]string{
"allowed_deps": allowedDeps.String(),
"new_allowed_deps": newAllowedDeps.String(),
},
})
}
func (s *apexDepsInfoSingleton) MakeVars(ctx android.MakeVarsContext) {
// Export check result to Make. The path is added to droidcore.
ctx.Strict("APEX_ALLOWED_DEPS_CHECK", s.allowedApexDepsInfoCheckResult.String())
}

View File

@ -584,18 +584,18 @@ func TestBasicApex(t *testing.T) {
ensureListContains(t, noticeInputs, "custom_notice_for_static_lib")
fullDepsInfo := strings.Split(ctx.ModuleForTests("myapex", "android_common_myapex_image").Output("depsinfo/fulllist.txt").Args["content"], "\\n")
ensureListContains(t, fullDepsInfo, "myjar(minSdkVersion:(no version)) <- myapex")
ensureListContains(t, fullDepsInfo, "mylib(minSdkVersion:(no version)) <- myapex")
ensureListContains(t, fullDepsInfo, "mylib2(minSdkVersion:(no version)) <- mylib")
ensureListContains(t, fullDepsInfo, "myotherjar(minSdkVersion:(no version)) <- myjar")
ensureListContains(t, fullDepsInfo, "mysharedjar(minSdkVersion:(no version)) (external) <- myjar")
ensureListContains(t, fullDepsInfo, " myjar(minSdkVersion:(no version)) <- myapex")
ensureListContains(t, fullDepsInfo, " mylib(minSdkVersion:(no version)) <- myapex")
ensureListContains(t, fullDepsInfo, " mylib2(minSdkVersion:(no version)) <- mylib")
ensureListContains(t, fullDepsInfo, " myotherjar(minSdkVersion:(no version)) <- myjar")
ensureListContains(t, fullDepsInfo, " mysharedjar(minSdkVersion:(no version)) (external) <- myjar")
flatDepsInfo := strings.Split(ctx.ModuleForTests("myapex", "android_common_myapex_image").Output("depsinfo/flatlist.txt").Args["content"], "\\n")
ensureListContains(t, flatDepsInfo, " myjar(minSdkVersion:(no version))")
ensureListContains(t, flatDepsInfo, " mylib(minSdkVersion:(no version))")
ensureListContains(t, flatDepsInfo, " mylib2(minSdkVersion:(no version))")
ensureListContains(t, flatDepsInfo, " myotherjar(minSdkVersion:(no version))")
ensureListContains(t, flatDepsInfo, " mysharedjar(minSdkVersion:(no version)) (external)")
ensureListContains(t, flatDepsInfo, "myjar(minSdkVersion:(no version))")
ensureListContains(t, flatDepsInfo, "mylib(minSdkVersion:(no version))")
ensureListContains(t, flatDepsInfo, "mylib2(minSdkVersion:(no version))")
ensureListContains(t, flatDepsInfo, "myotherjar(minSdkVersion:(no version))")
ensureListContains(t, flatDepsInfo, "mysharedjar(minSdkVersion:(no version)) (external)")
}
func TestDefaults(t *testing.T) {
@ -1012,14 +1012,14 @@ func TestApexWithExplicitStubsDependency(t *testing.T) {
ensureNotContains(t, libFooStubsLdFlags, "libbar.so")
fullDepsInfo := strings.Split(ctx.ModuleForTests("myapex2", "android_common_myapex2_image").Output("depsinfo/fulllist.txt").Args["content"], "\\n")
ensureListContains(t, fullDepsInfo, "mylib(minSdkVersion:(no version)) <- myapex2")
ensureListContains(t, fullDepsInfo, "libbaz(minSdkVersion:(no version)) <- mylib")
ensureListContains(t, fullDepsInfo, "libfoo(minSdkVersion:(no version)) (external) <- mylib")
ensureListContains(t, fullDepsInfo, " mylib(minSdkVersion:(no version)) <- myapex2")
ensureListContains(t, fullDepsInfo, " libbaz(minSdkVersion:(no version)) <- mylib")
ensureListContains(t, fullDepsInfo, " libfoo(minSdkVersion:(no version)) (external) <- mylib")
flatDepsInfo := strings.Split(ctx.ModuleForTests("myapex2", "android_common_myapex2_image").Output("depsinfo/flatlist.txt").Args["content"], "\\n")
ensureListContains(t, flatDepsInfo, " mylib(minSdkVersion:(no version))")
ensureListContains(t, flatDepsInfo, " libbaz(minSdkVersion:(no version))")
ensureListContains(t, flatDepsInfo, " libfoo(minSdkVersion:(no version)) (external)")
ensureListContains(t, flatDepsInfo, "mylib(minSdkVersion:(no version))")
ensureListContains(t, flatDepsInfo, "libbaz(minSdkVersion:(no version))")
ensureListContains(t, flatDepsInfo, "libfoo(minSdkVersion:(no version)) (external)")
}
func TestApexWithRuntimeLibsDependency(t *testing.T) {

View File

@ -33,7 +33,7 @@ var (
)
type AndroidMkContext interface {
Name() string
BaseModuleName() string
Target() android.Target
subAndroidMk(*android.AndroidMkEntries, interface{})
Arch() android.Arch
@ -278,7 +278,7 @@ func (library *libraryDecorator) AndroidMkEntries(ctx AndroidMkContext, entries
})
}
if len(library.Properties.Stubs.Versions) > 0 &&
android.DirectlyInAnyApex(ctx, ctx.Name()) && !ctx.InRamdisk() && !ctx.InRecovery() && !ctx.UseVndk() &&
android.DirectlyInAnyApex(ctx, ctx.BaseModuleName()) && !ctx.InRamdisk() && !ctx.InRecovery() && !ctx.UseVndk() &&
!ctx.static() {
if library.buildStubs() && library.isLatestStubVersion() {
// reference the latest version via its name without suffix when it is provided by apex

110
cc/cc.go
View File

@ -740,6 +740,9 @@ func (c *Module) StubsVersions() []string {
if library, ok := c.linker.(*libraryDecorator); ok {
return library.Properties.Stubs.Versions
}
if library, ok := c.linker.(*prebuiltLibraryLinker); ok {
return library.Properties.Stubs.Versions
}
}
panic(fmt.Errorf("StubsVersions called on non-library module: %q", c.BaseModuleName()))
}
@ -749,6 +752,9 @@ func (c *Module) CcLibrary() bool {
if _, ok := c.linker.(*libraryDecorator); ok {
return true
}
if _, ok := c.linker.(*prebuiltLibraryLinker); ok {
return true
}
}
return false
}
@ -774,6 +780,14 @@ func (c *Module) SetBuildStubs() {
c.Properties.PreventInstall = true
return
}
if library, ok := c.linker.(*prebuiltLibraryLinker); ok {
library.MutatedProperties.BuildStubs = true
c.Properties.HideFromMake = true
c.sanitize = nil
c.stl = nil
c.Properties.PreventInstall = true
return
}
if _, ok := c.linker.(*llndkStubDecorator); ok {
c.Properties.HideFromMake = true
return
@ -787,6 +801,9 @@ func (c *Module) BuildStubs() bool {
if library, ok := c.linker.(*libraryDecorator); ok {
return library.buildStubs()
}
if library, ok := c.linker.(*prebuiltLibraryLinker); ok {
return library.buildStubs()
}
}
panic(fmt.Errorf("BuildStubs called on non-library module: %q", c.BaseModuleName()))
}
@ -796,6 +813,10 @@ func (c *Module) SetAllStubsVersions(versions []string) {
library.MutatedProperties.AllStubsVersions = versions
return
}
if library, ok := c.linker.(*prebuiltLibraryLinker); ok {
library.MutatedProperties.AllStubsVersions = versions
return
}
if llndk, ok := c.linker.(*llndkStubDecorator); ok {
llndk.libraryDecorator.MutatedProperties.AllStubsVersions = versions
return
@ -806,6 +827,9 @@ func (c *Module) AllStubsVersions() []string {
if library, ok := c.linker.(*libraryDecorator); ok {
return library.MutatedProperties.AllStubsVersions
}
if library, ok := c.linker.(*prebuiltLibraryLinker); ok {
return library.MutatedProperties.AllStubsVersions
}
if llndk, ok := c.linker.(*llndkStubDecorator); ok {
return llndk.libraryDecorator.MutatedProperties.AllStubsVersions
}
@ -818,6 +842,10 @@ func (c *Module) SetStubsVersion(version string) {
library.MutatedProperties.StubsVersion = version
return
}
if library, ok := c.linker.(*prebuiltLibraryLinker); ok {
library.MutatedProperties.StubsVersion = version
return
}
if llndk, ok := c.linker.(*llndkStubDecorator); ok {
llndk.libraryDecorator.MutatedProperties.StubsVersion = version
return
@ -831,6 +859,9 @@ func (c *Module) StubsVersion() string {
if library, ok := c.linker.(*libraryDecorator); ok {
return library.MutatedProperties.StubsVersion
}
if library, ok := c.linker.(*prebuiltLibraryLinker); ok {
return library.MutatedProperties.StubsVersion
}
if llndk, ok := c.linker.(*llndkStubDecorator); ok {
return llndk.libraryDecorator.MutatedProperties.StubsVersion
}
@ -1073,6 +1104,8 @@ func (c *Module) getVndkExtendsModuleName() string {
func (c *Module) IsStubs() bool {
if library, ok := c.linker.(*libraryDecorator); ok {
return library.buildStubs()
} else if library, ok := c.linker.(*prebuiltLibraryLinker); ok {
return library.buildStubs()
} else if _, ok := c.linker.(*llndkStubDecorator); ok {
return true
}
@ -1830,6 +1863,42 @@ func GetCrtVariations(ctx android.BottomUpMutatorContext,
}
}
func (c *Module) addSharedLibDependenciesWithVersions(ctx android.BottomUpMutatorContext,
variations []blueprint.Variation, depTag libraryDependencyTag, name, version string, far bool) {
variations = append([]blueprint.Variation(nil), variations...)
if version != "" && VersionVariantAvailable(c) {
// Version is explicitly specified. i.e. libFoo#30
variations = append(variations, blueprint.Variation{Mutator: "version", Variation: version})
depTag.explicitlyVersioned = true
}
var deps []blueprint.Module
if far {
deps = ctx.AddFarVariationDependencies(variations, depTag, name)
} else {
deps = ctx.AddVariationDependencies(variations, depTag, name)
}
// If the version is not specified, add dependency to all stubs libraries.
// The stubs library will be used when the depending module is built for APEX and
// the dependent module is not in the same APEX.
if version == "" && VersionVariantAvailable(c) {
if dep, ok := deps[0].(*Module); ok {
for _, ver := range dep.AllStubsVersions() {
// Note that depTag.ExplicitlyVersioned is false in this case.
versionVariations := append(variations,
blueprint.Variation{Mutator: "version", Variation: ver})
if far {
ctx.AddFarVariationDependencies(versionVariations, depTag, name)
} else {
ctx.AddVariationDependencies(versionVariations, depTag, name)
}
}
}
}
}
func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) {
if !c.Enabled() {
return
@ -1930,6 +1999,11 @@ func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) {
buildStubs = true
}
}
if library, ok := c.linker.(*prebuiltLibraryLinker); ok {
if library.buildStubs() {
buildStubs = true
}
}
}
rewriteSnapshotLibs := func(lib string, snapshotMap *snapshotMap) string {
@ -2018,32 +2092,6 @@ func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) {
}, depTag, rewriteSnapshotLibs(lib, vendorSnapshotStaticLibs))
}
addSharedLibDependencies := func(depTag libraryDependencyTag, name string, version string) {
var variations []blueprint.Variation
variations = append(variations, blueprint.Variation{Mutator: "link", Variation: "shared"})
if version != "" && VersionVariantAvailable(c) {
// Version is explicitly specified. i.e. libFoo#30
variations = append(variations, blueprint.Variation{Mutator: "version", Variation: version})
depTag.explicitlyVersioned = true
}
deps := actx.AddVariationDependencies(variations, depTag, name)
// If the version is not specified, add dependency to all stubs libraries.
// The stubs library will be used when the depending module is built for APEX and
// the dependent module is not in the same APEX.
if version == "" && VersionVariantAvailable(c) {
if dep, ok := deps[0].(*Module); ok {
for _, ver := range dep.AllStubsVersions() {
// Note that depTag.ExplicitlyVersioned is false in this case.
ctx.AddVariationDependencies([]blueprint.Variation{
{Mutator: "link", Variation: "shared"},
{Mutator: "version", Variation: ver},
}, depTag, name)
}
}
}
}
// shared lib names without the #version suffix
var sharedLibNames []string
@ -2060,7 +2108,10 @@ func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) {
name, version := StubsLibNameAndVersion(lib)
sharedLibNames = append(sharedLibNames, name)
addSharedLibDependencies(depTag, name, version)
variations := []blueprint.Variation{
{Mutator: "link", Variation: "shared"},
}
c.addSharedLibDependenciesWithVersions(ctx, variations, depTag, name, version, false)
}
for _, lib := range deps.LateSharedLibs {
@ -2071,7 +2122,10 @@ func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) {
continue
}
depTag := libraryDependencyTag{Kind: sharedLibraryDependency, Order: lateLibraryDependency}
addSharedLibDependencies(depTag, lib, "")
variations := []blueprint.Variation{
{Mutator: "link", Variation: "shared"},
}
c.addSharedLibDependenciesWithVersions(ctx, variations, depTag, lib, "", false)
}
actx.AddVariationDependencies([]blueprint.Variation{

View File

@ -1040,7 +1040,7 @@ func sanitizerRuntimeMutator(mctx android.BottomUpMutatorContext) {
if c.Device() {
variations = append(variations, c.ImageVariation())
}
mctx.AddFarVariationDependencies(variations, depTag, runtimeLibrary)
c.addSharedLibDependenciesWithVersions(mctx, variations, depTag, runtimeLibrary, "", true)
}
// static lib does not have dependency to the runtime library. The
// dependency will be added to the executables or shared libs using

View File

@ -0,0 +1,39 @@
#!/bin/bash -e
#
# The script to run locally to re-generate global allowed list of dependencies
# for updatable modules.
if [ ! -e "build/envsetup.sh" ]; then
echo "ERROR: $0 must be run from the top of the tree"
exit 1
fi
source build/envsetup.sh > /dev/null || exit 1
readonly OUT_DIR=$(get_build_var OUT_DIR)
readonly ALLOWED_DEPS_FILE="build/soong/apex/allowed_deps.txt"
readonly NEW_ALLOWED_DEPS_FILE="${OUT_DIR}/soong/apex/depsinfo/new-allowed-deps.txt"
# If the script is run after droidcore failure, ${NEW_ALLOWED_DEPS_FILE}
# should already be built. If running the script manually, make sure it exists.
m "${NEW_ALLOWED_DEPS_FILE}" -j
cat > "${ALLOWED_DEPS_FILE}" << EndOfFileComment
# A list of allowed dependencies for all updatable modules.
#
# The list tracks all direct and transitive dependencies that end up within any
# of the updatable binaries; specifically excluding external dependencies
# required to compile those binaries. This prevents potential regressions in
# case a new dependency is not aware of the different functional and
# non-functional requirements being part of an updatable module, for example
# setting correct min_sdk_version.
#
# To update the list, run:
# repo-root$ build/soong/scripts/update-apex-allowed-deps.sh
#
# See go/apex-allowed-deps-error for more details.
# TODO(b/157465465): introduce automated quality signals and remove this list.
EndOfFileComment
cat "${NEW_ALLOWED_DEPS_FILE}" >> "${ALLOWED_DEPS_FILE}"