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
diff --git a/core/cc_prebuilt_internal.mk b/core/cc_prebuilt_internal.mk
index 2bf4fdc..c0e45b2 100644
--- a/core/cc_prebuilt_internal.mk
+++ b/core/cc_prebuilt_internal.mk
@@ -139,17 +139,19 @@
$(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.