Skip to content

Commit

Permalink
build: fix memory manager compile options for CMake
Browse files Browse the repository at this point in the history
This enables CMake based build for sim:ostest. Flags which
are set by set_source_files_properties are not reflected in
final build. Changing these to target_compile_options makes
CMake build runnable.

Signed-off-by: Daniel Jasinski <[email protected]>
  • Loading branch information
Jasinsky authored and xiaoxiang781216 committed Sep 10, 2024
1 parent 1413fc0 commit 7dbb887
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions mm/kasan/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
# ##############################################################################
if(CONFIG_MM_KASAN)
target_sources(mm PRIVATE kasan.c)
set_source_files_properties(kasan.c PROPERTIES COMPILE_FLAGS
-fno-sanitize=kernel-address)
set_source_files_properties(kasan.c PROPERTIES COMPILE_FLAGS -fno-lto)

target_compile_options(mm PRIVATE -fno-sanitize=kernel-address)

if(NOT CONFIG_LTO_NONE)
target_compile_options(mm PRIVATE -fno-lto)
endif()

endif()

0 comments on commit 7dbb887

Please sign in to comment.