diff options
author | Anthony Stange <stange@google.com> | 2019-05-06 19:13:22 -0400 |
---|---|---|
committer | Anthony Stange <stange@google.com> | 2019-05-08 16:24:57 -0400 |
commit | 5608ae4f4af6877a9322db82ae3b7d5d2a5b1d18 (patch) | |
tree | 3c164b1cb839ce7522ad54913dd4922575f0d2b3 | |
parent | f36803f3a09c330573e8805c618a69e8418552e0 (diff) | |
download | chre-5608ae4f4af6877a9322db82ae3b7d5d2a5b1d18.tar.gz |
Don't require compiling default static nanoapps
The default static nanoapps the CHRE team provides
may not be needed in certain builds. Allow others
to avoid compiling them if necessary.
Bug: 131912580
Test: compile
Change-Id: I55b0eacc283c0d88393a8bb15edb502baf3aa8b8
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | core/static_nanoapps.cc | 8 |
2 files changed, 9 insertions, 0 deletions
@@ -22,6 +22,7 @@ OUTPUT_NAME = libchre COMMON_CFLAGS += -DCHRE_MINIMUM_LOG_LEVEL=CHRE_LOG_LEVEL_DEBUG COMMON_CFLAGS += -DNANOAPP_MINIMUM_LOG_LEVEL=CHRE_LOG_LEVEL_DEBUG COMMON_CFLAGS += -DCHRE_ENABLE_DEBUG_DUMP +COMMON_CFLAGS += -DCHRE_INCLUDE_DEFAULT_STATIC_NANOAPPS ifneq ($(CHRE_ASSERTIONS_ENABLED), false) COMMON_CFLAGS += -DCHRE_ASSERTIONS_ENABLED diff --git a/core/static_nanoapps.cc b/core/static_nanoapps.cc index dc571c61..d0f86156 100644 --- a/core/static_nanoapps.cc +++ b/core/static_nanoapps.cc @@ -14,7 +14,15 @@ * limitations under the License. */ +// If the CHRE build variant wants to supply its own static nanoapps, include +// chre/platform/static_nanoapp_init.h in the nanoapp to include and define +// CHRE_STATIC_NANOAPP_INIT with the appropriate parameters (see examples under +// chre/apps/). Then, define the UniquePtr created by CHRE_STATIC_NANOAPP_INIT +// similar to chre/apps/apps.h and add that variable to kStaticNanoappList +// below. +#ifdef CHRE_INCLUDE_DEFAULT_STATIC_NANOAPPS #include "chre/apps/apps.h" +#endif // CHRE_INCLUDE_DEFAULT_STATIC_NANOAPPS #include "chre/core/event_loop_manager.h" #include "chre/core/static_nanoapps.h" #include "chre/util/macros.h" |