Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hwmv2: Native targets covert to HW model v2 #69034

Merged
merged 6 commits into from
Feb 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions cmake/modules/FindHostTools.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ find_program(BOSSAC bossac)
# in the mcuboot repository if that's present in some cases)
find_program(IMGTOOL imgtool)

# Pick host system's toolchain if we are targeting posix
if("${ARCH}" STREQUAL "posix" OR "${ARCH}" STREQUAL "unit_testing")
# Default to the host system's toolchain if we are targeting a host based target
if((${BOARD_DIR} MATCHES "boards\/native") OR ("${ARCH}" STREQUAL "posix")
OR ("${BOARD}" STREQUAL "unit_testing"))
Comment on lines +69 to +70
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for host tools we just need a generic compiler for preprocessing.

This mean we should be able to move this check to https://github.com/zephyrproject-rtos/zephyr/blob/main/cmake/modules/FindTargetTools.cmake where the arch is known.

This location is probably leftover from former days boilerplate.cmake file.

We can keep it here for now, but then please add a comment in code or create an enhancement issue / comment in #51831 to request looking at this as followup work.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Item added to #51831 list of TODOs

if(NOT "${ZEPHYR_TOOLCHAIN_VARIANT}" STREQUAL "llvm")
set(ZEPHYR_TOOLCHAIN_VARIANT "host")
endif()
Expand Down