From 5c4be68b3cb382348f69c9e64ad45b2ce39e890a Mon Sep 17 00:00:00 2001 From: Alberto Escolar Piedras Date: Mon, 10 Mar 2025 16:45:35 +0100 Subject: [PATCH] arch/posix/CMakeLists.txt: Move comment to correct place This comment "moved" over the years as more code was added. Let's put it where it belongs, and simplify it a bit. Signed-off-by: Alberto Escolar Piedras --- arch/posix/CMakeLists.txt | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/posix/CMakeLists.txt b/arch/posix/CMakeLists.txt index 3d7280daa52..21b6bf7f197 100644 --- a/arch/posix/CMakeLists.txt +++ b/arch/posix/CMakeLists.txt @@ -75,6 +75,10 @@ if (CONFIG_NATIVE_APPLICATION) zephyr_compile_options( -include ${ZEPHYR_BASE}/arch/posix/include/posix_cheats.h ) + # About this -include directive: The reason to do it this way, is because in this + # manner it is transparent to the application. Otherwise posix_cheats.h needs to + # be included in all the applications' files which define main( ), and in any + # app file which uses any of the APIs renamed in that header. elseif (CONFIG_NATIVE_LIBRARY) zephyr_compile_options( -fvisibility=hidden @@ -146,14 +150,6 @@ if (CONFIG_NATIVE_APPLICATION) ) endif() -# About the -include directive: The reason to do it this way, is because in this -# manner it is transparent to the application. Otherwise posix_cheats.h needs to -# be included in all the applications' files which define main( ), and in any -# app file which uses the pthreads like API provided by Zephyr -# ( include/posix/pthread.h / kernel/pthread.c ) [And any future API added to -# Zephyr which will clash with the native POSIX API] . It would also need to -# be included in a few zephyr kernel files. - # # Support for the LLVM Sanitizer toolchain instrumentation frameworks # (supported by current gcc's as well)