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

Commit f6d37e36 authored by Felipe Leme's avatar Felipe Leme
Browse files

Creates a libdumpstateheaders module to export headers.

Currently, the device-specific dumpstate projects uses dumpstate.h
by importing just the header in the their makefiles:

LOCAL_C_INCLUDES := frameworks/native/cmds/dumpstate

But this approach makes it hard to include external stuff on
dumpstate.h (like common macros) because it breaks the device-specific
builds (unless they are changed to include the proper shared library
dependency).

A better approach is to define a libdumpstateheaders that contains the
proper dependencies, and let the projects use it instead:

LOCAL_STATIC_LIBRARIES := libdumpstateheaders

BUG: 26379932
BUG: 31982882
Test: DumpstateTest passes and manual verification

Change-Id: Iaabff379aded412f33cda1f93f3253866aff9f25
parent 9b1d6908
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -20,6 +20,25 @@ COMMON_SHARED_LIBRARIES := \
        liblog \
        libselinux

# ====================#
# libdumpstateheaders #
# ====================#
# TODO: this module is necessary so the device-specific libdumpstate implementations do not
# need to add any other dependency (like libbase). Should go away once dumpstate HAL changes.
include $(CLEAR_VARS)

LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)
LOCAL_MODULE := libdumpstateheaders
LOCAL_EXPORT_SHARED_LIBRARY_HEADERS := \
        $(COMMON_SHARED_LIBRARIES)
LOCAL_EXPORT_STATIC_LIBRARY_HEADERS := \
        $(COMMON_ZIP_LIBRARIES)
# Soong requires that whats is on LOCAL_EXPORTED_ is also on LOCAL_
LOCAL_SHARED_LIBRARIES := $(LOCAL_EXPORT_SHARED_LIBRARY_HEADERS)
LOCAL_STATIC_LIBRARIES := $(LOCAL_EXPORT_STATIC_LIBRARY_HEADERS)

include $(BUILD_STATIC_LIBRARY)

# ==========#
# dumpstate #
# ==========#