未验证 提交 bee3d971 编写于 作者: O openharmony_ci 提交者: Gitee

!890 fix:修复llvm编译告警

Merge pull request !890 from Zhaotianyu/0601llvm_apt
...@@ -90,8 +90,13 @@ kernel_module(module_name) { ...@@ -90,8 +90,13 @@ kernel_module(module_name) {
} }
public_configs = [ ":public" ] public_configs = [ ":public" ]
configs += [ ":private" ]
} }
config("public") { config("public") {
include_dirs = [ "include" ] include_dirs = [ "include" ]
} }
config("private") {
cflags = [ "-Wno-frame-address" ]
}
...@@ -40,6 +40,6 @@ LOCAL_SRCS := $(wildcard ipc/*.c) $(wildcard core/*.c) $(wildcard mem/membox/*. ...@@ -40,6 +40,6 @@ LOCAL_SRCS := $(wildcard ipc/*.c) $(wildcard core/*.c) $(wildcard mem/membox/*.
$(wildcard sched/*.c) \ $(wildcard sched/*.c) \
$(wildcard vm/*.c) $(wildcard vm/*.c)
LOCAL_FLAGS := $(LITEOS_CFLAGS_INTERWORK) LOCAL_FLAGS := $(LITEOS_CFLAGS_INTERWORK) -Wno-frame-address
include $(MODULE) include $(MODULE)
...@@ -190,11 +190,7 @@ VOID OsLockDepCheckIn(SPIN_LOCK_S *lock) ...@@ -190,11 +190,7 @@ VOID OsLockDepCheckIn(SPIN_LOCK_S *lock)
{ {
UINT32 intSave; UINT32 intSave;
enum LockDepErrType checkResult = LOCKDEP_SUCCESS; enum LockDepErrType checkResult = LOCKDEP_SUCCESS;
#ifdef LOSCFG_COMPILER_CLANG_LLVM
VOID *requestAddr = (VOID *)__builtin_return_address(1); VOID *requestAddr = (VOID *)__builtin_return_address(1);
#else
VOID *requestAddr = (VOID *)__builtin_return_address(0);
#endif
LosTaskCB *current = OsCurrTaskGet(); LosTaskCB *current = OsCurrTaskGet();
LockDep *lockDep = &current->lockDep; LockDep *lockDep = &current->lockDep;
LosTaskCB *lockOwner = NULL; LosTaskCB *lockOwner = NULL;
...@@ -276,11 +272,7 @@ VOID OsLockDepCheckOut(SPIN_LOCK_S *lock) ...@@ -276,11 +272,7 @@ VOID OsLockDepCheckOut(SPIN_LOCK_S *lock)
UINT32 intSave; UINT32 intSave;
INT32 depth; INT32 depth;
enum LockDepErrType checkResult = LOCKDEP_SUCCESS; enum LockDepErrType checkResult = LOCKDEP_SUCCESS;
#ifdef LOSCFG_COMPILER_CLANG_LLVM
VOID *requestAddr = (VOID *)__builtin_return_address(1); VOID *requestAddr = (VOID *)__builtin_return_address(1);
#else
VOID *requestAddr = (VOID *)__builtin_return_address(0);
#endif
LosTaskCB *current = OsCurrTaskGet(); LosTaskCB *current = OsCurrTaskGet();
LosTaskCB *owner = NULL; LosTaskCB *owner = NULL;
LockDep *lockDep = NULL; LockDep *lockDep = NULL;
......
...@@ -103,13 +103,13 @@ config("private") { ...@@ -103,13 +103,13 @@ config("private") {
if (defined(LOSCFG_COMPILER_CLANG_LLVM)) { if (defined(LOSCFG_COMPILER_CLANG_LLVM)) {
cflags = [ cflags = [
"-Wno-char-subscripts", "-Wno-char-subscripts",
"-Wno-unknown-pragmas", "-Wno-ignored-pragmas",
"-Wno-strict-prototypes",
] ]
} else { } else {
cflags = [ cflags = [
"-frounding-math", "-frounding-math",
"-Wno-unused-but-set-variable", "-Wno-unused-but-set-variable",
"-Wno-unknown-pragmas",
] ]
} }
...@@ -117,5 +117,6 @@ config("private") { ...@@ -117,5 +117,6 @@ config("private") {
"-Wno-shift-op-parentheses", "-Wno-shift-op-parentheses",
"-Wno-logical-op-parentheses", "-Wno-logical-op-parentheses",
"-Wno-bitwise-op-parentheses", "-Wno-bitwise-op-parentheses",
"-Wno-unknown-pragmas",
] ]
} }
...@@ -59,10 +59,10 @@ LOCAL_INCLUDE += $(addprefix -I$(MUSLPORTINGDIR)/, src/include src/internal) ...@@ -59,10 +59,10 @@ LOCAL_INCLUDE += $(addprefix -I$(MUSLPORTINGDIR)/, src/include src/internal)
LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LOCAL_CMACRO) LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LOCAL_CMACRO)
ifeq ($(LOSCFG_COMPILER_CLANG_LLVM), y) ifeq ($(LOSCFG_COMPILER_CLANG_LLVM), y)
LOCAL_FLAGS +=-Wno-char-subscripts -Wno-unknown-pragmas LOCAL_FLAGS +=-Wno-char-subscripts -Wno-ignored-pragmas -Wno-strict-prototypes
else else
LOCAL_FLAGS += -frounding-math -Wno-unused-but-set-variable -Wno-unknown-pragmas LOCAL_FLAGS += -frounding-math -Wno-unused-but-set-variable
endif endif
LOCAL_FLAGS += -Wno-shift-op-parentheses -Wno-logical-op-parentheses -Wno-bitwise-op-parentheses LOCAL_FLAGS += -Wno-shift-op-parentheses -Wno-logical-op-parentheses -Wno-bitwise-op-parentheses -Wno-unknown-pragmas
include $(MODULE) include $(MODULE)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册