Support for LOCAL_HAL_STATIC_LIBRARIES

Now you can have a board config variable BOARD_HAL_STATIC_LIBRARIES,
which is a list of board-specific HAL static library names with pattern
"lib<library_name>.<board_specific_suffix>". LOCAL_HAL_STATIC_LIBRARIES
is a list of "lib<library_name>" and any matched
BOARD_HAL_STATIC_LIBRARIES will be added to the LOCAL_STATIC_LIBRARIES;
if no match is found, lib<library_name>.default will be used.

Bug: 10262105
Change-Id: Ic89d8d417d1dd65a227e4187a157fd3b77c4af34
This commit is contained in:
Ying Wang
2013-08-13 12:35:10 -07:00
parent 5e1e791f3a
commit 285045bd83
2 changed files with 10 additions and 0 deletions

View File

@@ -90,6 +90,15 @@ $(my_prefix)DEPENDENCIES_ON_SHARED_LIBRARIES += $(LOCAL_MODULE):$(LOCAL_INSTALLE
endif
endif
# Add static HAL libraries
ifdef LOCAL_HAL_STATIC_LIBRARIES
$(foreach lib, $(LOCAL_HAL_STATIC_LIBRARIES), \
$(eval b_lib := $(filter $(lib).%,$(BOARD_HAL_STATIC_LIBRARIES)))\
$(if $(b_lib), $(eval LOCAL_STATIC_LIBRARIES += $(b_lib)),\
$(eval LOCAL_STATIC_LIBRARIES += $(lib).default)))
b_lib :=
endif
ifeq ($(strip $(LOCAL_ADDRESS_SANITIZER)),true)
LOCAL_CLANG := true
LOCAL_CFLAGS += $(ADDRESS_SANITIZER_CONFIG_EXTRA_CFLAGS)

View File

@@ -139,6 +139,7 @@ LOCAL_ADDITIONAL_CERTIFICATES:=
LOCAL_PREBUILT_MODULE_FILE:=
LOCAL_POST_INSTALL_CMD:=
LOCAL_DIST_BUNDLED_BINARIES:=
LOCAL_HAL_STATIC_LIBRARIES:=
# Trim MAKEFILE_LIST so that $(call my-dir) doesn't need to
# iterate over thousands of entries every time.