From ebd70f959f1642c99416f625cff76925f55e1802 Mon Sep 17 00:00:00 2001 From: Alberto Escolar Piedras Date: Wed, 15 Nov 2023 14:29:55 +0100 Subject: [PATCH] flash host fuse access: Fix for native_sim For native_sim we need to have the fuse library linked with the native simulator runner, not with the embedded code. Let's fix it. Signed-off-by: Alberto Escolar Piedras --- subsys/fs/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/subsys/fs/CMakeLists.txt b/subsys/fs/CMakeLists.txt index 0c1bce7425f..e6c66d304ce 100644 --- a/subsys/fs/CMakeLists.txt +++ b/subsys/fs/CMakeLists.txt @@ -31,7 +31,11 @@ if(CONFIG_FUSE_FS_ACCESS) find_package(PkgConfig REQUIRED) pkg_search_module(FUSE REQUIRED fuse) zephyr_include_directories(${FUSE_INCLUDE_DIR}) - zephyr_link_libraries(${FUSE_LIBRARIES}) + if (CONFIG_NATIVE_LIBRARY) + target_link_options(native_simulator INTERFACE "-l${FUSE_LIBRARIES}") + else() + zephyr_link_libraries(${FUSE_LIBRARIES}) + endif() zephyr_library_compile_definitions(_FILE_OFFSET_BITS=64) zephyr_library_sources(fuse_fs_access.c) endif()