Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 285045bd authored by Ying Wang's avatar Ying Wang
Browse files

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
parent 5e1e791f
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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)
+1 −0
Original line number Diff line number Diff line
@@ -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.