@ -1145,22 +1145,35 @@ endif
## When compiling against the VNDK, use LL-NDK libraries
###########################################################
i f n e q ( $( LOCAL_USE_VNDK ) , )
####################################################
## Soong modules may be built twice, once for /system
## and once for /vendor. If we're using the VNDK,
## switch all soong libraries over to the /vendor
## variant.
####################################################
my_whole_static_libraries := $( foreach l,$( my_whole_static_libraries) ,\
$( if $( SPLIT_VENDOR.STATIC_LIBRARIES.$( l) ) ,$( l) .vendor,$( l) ) )
my_static_libraries := $( foreach l,$( my_static_libraries) ,\
$( if $( SPLIT_VENDOR.STATIC_LIBRARIES.$( l) ) ,$( l) .vendor,$( l) ) )
my_shared_libraries := $( foreach l,$( my_shared_libraries) ,\
$( if $( SPLIT_VENDOR.SHARED_LIBRARIES.$( l) ) ,$( l) .vendor,$( l) ) )
my_system_shared_libraries := $( foreach l,$( my_system_shared_libraries) ,\
$( if $( SPLIT_VENDOR.SHARED_LIBRARIES.$( l) ) ,$( l) .vendor,$( l) ) )
my_header_libraries := $( foreach l,$( my_header_libraries) ,\
$( if $( SPLIT_VENDOR.HEADER_LIBRARIES.$( l) ) ,$( l) .vendor,$( l) ) )
#####################################################
## Soong modules may be built three times, once for
## /system, once for /vendor and once for /product.
## If we're using the VNDK, switch all soong
## libraries over to the /vendor or /product variant.
#####################################################
ifeq ( $( LOCAL_USE_VNDK_PRODUCT) ,true)
my_whole_static_libraries := $( foreach l,$( my_whole_static_libraries) ,\
$( if $( SPLIT_PRODUCT.STATIC_LIBRARIES.$( l) ) ,$( l) .product,$( l) ) )
my_static_libraries := $( foreach l,$( my_static_libraries) ,\
$( if $( SPLIT_PRODUCT.STATIC_LIBRARIES.$( l) ) ,$( l) .product,$( l) ) )
my_shared_libraries := $( foreach l,$( my_shared_libraries) ,\
$( if $( SPLIT_PRODUCT.SHARED_LIBRARIES.$( l) ) ,$( l) .product,$( l) ) )
my_system_shared_libraries := $( foreach l,$( my_system_shared_libraries) ,\
$( if $( SPLIT_PRODUCT.SHARED_LIBRARIES.$( l) ) ,$( l) .product,$( l) ) )
my_header_libraries := $( foreach l,$( my_header_libraries) ,\
$( if $( SPLIT_PRODUCT.HEADER_LIBRARIES.$( l) ) ,$( l) .product,$( l) ) )
else
my_whole_static_libraries := $( foreach l,$( my_whole_static_libraries) ,\
$( if $( SPLIT_VENDOR.STATIC_LIBRARIES.$( l) ) ,$( l) .vendor,$( l) ) )
my_static_libraries := $( foreach l,$( my_static_libraries) ,\
$( if $( SPLIT_VENDOR.STATIC_LIBRARIES.$( l) ) ,$( l) .vendor,$( l) ) )
my_shared_libraries := $( foreach l,$( my_shared_libraries) ,\
$( if $( SPLIT_VENDOR.SHARED_LIBRARIES.$( l) ) ,$( l) .vendor,$( l) ) )
my_system_shared_libraries := $( foreach l,$( my_system_shared_libraries) ,\
$( if $( SPLIT_VENDOR.SHARED_LIBRARIES.$( l) ) ,$( l) .vendor,$( l) ) )
my_header_libraries := $( foreach l,$( my_header_libraries) ,\
$( if $( SPLIT_VENDOR.HEADER_LIBRARIES.$( l) ) ,$( l) .vendor,$( l) ) )
endif
e n d i f
# Platform can use vendor public libraries. If a required shared lib is one of
@ -1207,6 +1220,7 @@ my_warn_types := $(my_warn_ndk_types)
my_allowed_types := $( my_allowed_ndk_types)
e l s e i f d e f L O C A L _ U S E _ V N D K
_name := $( patsubst %.vendor,%,$( LOCAL_MODULE) )
_name := $( patsubst %.product,%,$( LOCAL_MODULE) )
ifneq ( $( filter $( _name) ,$( VNDK_CORE_LIBRARIES) $( VNDK_SAMEPROCESS_LIBRARIES) $( LLNDK_LIBRARIES) ) ,)
ifeq ( $( filter $( _name) ,$( VNDK_PRIVATE_LIBRARIES) ) ,)
my_link_type := native:vndk
@ -1215,6 +1229,12 @@ else ifdef LOCAL_USE_VNDK
endif
my_warn_types :=
my_allowed_types := native:vndk native:vndk_private
else ifeq ( $( LOCAL_USE_VNDK_PRODUCT) ,true)
# Modules installed to /product cannot directly depend on modules marked
# with vendor_available: false
my_link_type := native:product
my_warn_types :=
my_allowed_types := native:product native:vndk native:platform_vndk
else
# Modules installed to /vendor cannot directly depend on modules marked
# with vendor_available: false