Skip to content

Commit 7ca4c2d

Browse files
Fix a compilation race condition for higher version Zephyr (#4907)
1 parent dd0fee2 commit 7ca4c2d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

product-mini/platforms/zephyr/user-mode/lib-wamr-zephyr/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ zephyr_library_sources (
5757
wamr_lib.c
5858
)
5959

60+
# Ensure generated headers (e.g. heap_constants.h) are ready before compiling
61+
# the library. Zephyr adds this dependency for its own libraries automatically,
62+
# but parallel builds can race when the library is added via add_subdirectory.
63+
if(TARGET zephyr_generated_headers)
64+
add_dependencies(wamr_lib zephyr_generated_headers)
65+
endif()
66+
6067
# Specify the memory partition where all globals(including the WAMR global heap buffer)
6168
# in the library should be placed. This partition will be defined in the app source code
6269
# and added to the use-mode thread that uses the WAMR library.

0 commit comments

Comments
 (0)