Fix build when HILOG is disabled

Fix build when BASE_CORE_HILOG option is disabled.
Use similar printing function to output missing HILOG
logs.

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: Id5c63568ccb1ba90daadddf7e26d3e0f6c9f30ce
This commit is contained in:
Zbigniew Bodek 2020-10-08 18:48:41 +08:00 committed by Wojciech Zmuda WX948747
parent 064427fcaf
commit 22f0e9ac30
2 changed files with 10 additions and 0 deletions

View File

@ -35,7 +35,14 @@
#include "los_printf.h"
#include "los_task_pri.h"
#include "los_process_pri.h"
#ifdef LOSCFG_BASE_CORE_HILOG
#include "log.h"
#else
#define HILOG_INFO(type, fmt, ...) PRINT_INFO(fmt, __VA_ARGS__)
#define HILOG_ERROR(type, fmt, ...) PRINT_ERR(fmt, __VA_ARGS__)
#endif
#ifdef LOSCFG_SHELL
#include "shcmd.h"
#include "shell.h"

View File

@ -49,6 +49,9 @@ LOCAL_SRCS := $(filter-out ../kernel/common/los_rootfs.c, $(LOCAL_SRCS))
ifneq ($(LOSCFG_FS_VFS), y)
LOCAL_SRCS := $(filter-out ../kernel/common/console.c ../kernel/common/virtual_serial.c, $(LOCAL_SRCS))
endif
ifneq ($(LOSCFG_BASE_CORE_HILOG), y)
LOCAL_SRCS := $(filter-out ../kernel/common/los_hilog.c, $(LOCAL_SRCS))
endif
else
LOCAL_SRCS += $(wildcard ../kernel/common/los_config.c)
LOCAL_SRCS += $(wildcard ../kernel/common/los_printf.c)