1
0
Fork 0
forked from nuttx/nuttx-update

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:
wangmingrong1 2024-12-05 14:12:09 +08:00 committed by Xiang Xiao
parent fed3da9f03
commit ee20aa888b
2 changed files with 2 additions and 8 deletions

View file

@ -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})

View file

@ -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