From a45d6f5ee9fe493c1b0e71b002bb8cda7fcaf19a Mon Sep 17 00:00:00 2001 From: Logan Chien Date: Thu, 11 Jul 2019 15:11:04 -0700 Subject: [PATCH 1/2] Move cxx_stl_setup.mk out of ifdef This commit moves `include cxx_stl_setup.mk` out of `ifdef my_shared_libraries` so that it can always get a chance to tweak my_shared_libraries. Bug: 137302468 Test: lunch aosp_walleye-userdebug && make Test: lunch aosp_walleye-userdebug && make check-elf-files Change-Id: Id756340f0a62d7ac06d301c3260430a1af74ed89 --- core/cc_prebuilt_internal.mk | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/cc_prebuilt_internal.mk b/core/cc_prebuilt_internal.mk index 2bf4fdc6eb..c0e45b2b8e 100644 --- a/core/cc_prebuilt_internal.mk +++ b/core/cc_prebuilt_internal.mk @@ -139,17 +139,19 @@ my_shared_libraries := \ $(filter-out $(my_system_shared_libraries),$(LOCAL_SHARED_LIBRARIES)) \ $(my_system_shared_libraries) -ifdef my_shared_libraries -# Extra shared libraries introduced by LOCAL_CXX_STL. +# Extra shared libraries introduced by LOCAL_CXX_STL (may append some libraries to +# my_shared_libraries). include $(BUILD_SYSTEM)/cxx_stl_setup.mk + +ifdef my_shared_libraries ifdef LOCAL_USE_VNDK my_shared_libraries := $(foreach l,$(my_shared_libraries),\ $(if $(SPLIT_VENDOR.SHARED_LIBRARIES.$(l)),$(l).vendor,$(l))) endif $(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)DEPENDENCIES_ON_SHARED_LIBRARIES += \ $(my_register_name):$(LOCAL_INSTALLED_MODULE):$(subst $(space),$(comma),$(my_shared_libraries)) -endif endif # my_shared_libraries +endif # LOCAL_INSTALLED_MODULE # We need to enclose the above export_includes and my_built_shared_libraries in # "my_strip_module not true" because otherwise the rules are defined in dynamic_binary.mk. From e984ebbb571ca9e6e2e62350b310430a00468d6f Mon Sep 17 00:00:00 2001 From: Logan Chien Date: Thu, 11 Jul 2019 14:00:04 -0700 Subject: [PATCH 2/2] Strip my_shared_libraries to remove space char This commit strips my_shared_libraries to remove the unwanted space character when both `$(filter-out ...)` and `$(my_system_shared_libraries)` are empty. Bug: 137302468 Test: lunch aosp_walleye-userdebug && make Test: lunch aosp_walleye-userdebug && make check-elf-files Change-Id: Ia0410da877196c104a61d48c92a2be969a9754a5 --- core/cc_prebuilt_internal.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/cc_prebuilt_internal.mk b/core/cc_prebuilt_internal.mk index c0e45b2b8e..0c87151aac 100644 --- a/core/cc_prebuilt_internal.mk +++ b/core/cc_prebuilt_internal.mk @@ -135,9 +135,9 @@ else endif endif -my_shared_libraries := \ +my_shared_libraries := $(strip \ $(filter-out $(my_system_shared_libraries),$(LOCAL_SHARED_LIBRARIES)) \ - $(my_system_shared_libraries) + $(my_system_shared_libraries)) # Extra shared libraries introduced by LOCAL_CXX_STL (may append some libraries to # my_shared_libraries).