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

Zephyr toolchain infrastructure improvement, generic/target.cmake #71368

Open
Tracked by #69546
tejlmand opened this issue Apr 11, 2024 · 0 comments
Open
Tracked by #69546

Zephyr toolchain infrastructure improvement, generic/target.cmake #71368

tejlmand opened this issue Apr 11, 2024 · 0 comments
Assignees
Labels
area: Build System Enhancement Changes/Updates/Additions to existing features

Comments

@tejlmand
Copy link
Collaborator

tejlmand commented Apr 11, 2024

Zephyr Toolchain handling is split in generic.cmake and target.cmake files.

The reason for this split is to allow loading of generic.cmake during early CMake configure time to define a set of host tools which are independent of the target build.

An example is a generic C compiler which can be used for pre-processing, but not compilation (devicetree use)

Later, when devicetree and Kconfig has been executed, all required target information is available (for example arch), then the correct set of target tools can be defined, including the correct C compiler / arch flags for the compiler invocation.

The HWMv2 adoptation for native_posix revealed that the split above is not honored as expected, see #69034 (comment)

As additional context, the current implementation makes it harder than necessary to re-use portion of Zephyr SDK infrastructure, see #71163.

This enhancement issue must address above limitations, and further make the generic/target separation clearer, so that this can be reused.
Also the need for arch/board knowledge in generic stages must be removed.

Host based targets (native(posix) and unit_testing), which defaults to the host toolchain, should do this as part of FindTargetTools.cmake ), not as part of host tools. (Although in this case the target is also the host)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Build System Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

No branches or pull requests

2 participants