Skip to content

Commit 5c4be68

Browse files
aescolarkartben
authored andcommitted
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 <[email protected]>
1 parent b5bc307 commit 5c4be68

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

arch/posix/CMakeLists.txt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ if (CONFIG_NATIVE_APPLICATION)
7575
zephyr_compile_options(
7676
-include ${ZEPHYR_BASE}/arch/posix/include/posix_cheats.h
7777
)
78+
# About this -include directive: The reason to do it this way, is because in this
79+
# manner it is transparent to the application. Otherwise posix_cheats.h needs to
80+
# be included in all the applications' files which define main( ), and in any
81+
# app file which uses any of the APIs renamed in that header.
7882
elseif (CONFIG_NATIVE_LIBRARY)
7983
zephyr_compile_options(
8084
-fvisibility=hidden
@@ -146,14 +150,6 @@ if (CONFIG_NATIVE_APPLICATION)
146150
)
147151
endif()
148152

149-
# About the -include directive: The reason to do it this way, is because in this
150-
# manner it is transparent to the application. Otherwise posix_cheats.h needs to
151-
# be included in all the applications' files which define main( ), and in any
152-
# app file which uses the pthreads like API provided by Zephyr
153-
# ( include/posix/pthread.h / kernel/pthread.c ) [And any future API added to
154-
# Zephyr which will clash with the native POSIX API] . It would also need to
155-
# be included in a few zephyr kernel files.
156-
157153
#
158154
# Support for the LLVM Sanitizer toolchain instrumentation frameworks
159155
# (supported by current gcc's as well)

0 commit comments

Comments
 (0)