mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 06:18:40 +08:00
kasan/lto: Turn off lto by default anyway
Of course, there is an error here, that is, the conditional judgment of ifeq ($(CONFIG_LTO_NONE),n) CFLAGS += -fno-lto endif is wrong, it should be judged as "ifneq ($(CONFIG_LTO_NONE),)" Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
This commit is contained in:
parent
fed3da9f03
commit
ee20aa888b
2 changed files with 2 additions and 8 deletions
|
@ -22,12 +22,9 @@
|
|||
set(SRCS hook.c)
|
||||
|
||||
if(CONFIG_MM_KASAN)
|
||||
list(APPEND FLAGS ${NO_LTO})
|
||||
list(APPEND FLAGS -fno-builtin)
|
||||
list(APPEND FLAGS -fno-sanitize=kernel-address)
|
||||
|
||||
if(CONFIG_LTO_NONE)
|
||||
list(APPEND FLAGS -fno-lto)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_sources(mm PRIVATE ${SRCS})
|
||||
|
|
|
@ -23,12 +23,9 @@
|
|||
CSRCS += hook.c
|
||||
|
||||
ifeq ($(CONFIG_MM_KASAN),y)
|
||||
CFLAGS += -fno-lto
|
||||
CFLAGS += -fno-builtin
|
||||
CFLAGS += -fno-sanitize=kernel-address
|
||||
|
||||
ifeq ($(CONFIG_LTO_NONE),n)
|
||||
CFLAGS += -fno-lto
|
||||
endif
|
||||
endif
|
||||
|
||||
# Add the core heap directory to the build
|
||||
|
|
Loading…
Reference in a new issue