[RFC] build: namespace generated headers with zephyr/
#73114
Labels
area: Build System
area: Userspace
Userspace
RFC
Request For Comments: want input from the community
Introduction
Related to #41543.
Multiple work has been done to move the in-tree header files into the
zephyr/
folder, however, the generated header files are still not namespaced withzephyr/
, i.e.:app_version.h
cmake_intdef.h
core-isa-dM.h
devicetree_generated.h
driver-validation.h
kobj-types-enum.h
linker-kobject-prebuilt-data.h
mcuboot_version.h
offsets.h
otype-to-size.h
otype-to-str.h
strerror_table.h
strsignal_table.h
syscall_list.h
version.h
zsr.h
autoconf.h
)Problem description
Some of the generated headers have pretty generic names, i.e.:
version.h
, and can potentially conflict with other library / user applications. Ideally, all Zephyr's headers, in-tree or generated, should be namespaced withzephyr/
.Proposed change
To avoid potential conflicts with other library or user application headers due to generic names, introduce a zephyr/ namespace for all Zephyr-generated and in-tree headers. This can be achieved by modifying the CMake files and scripts responsible for generating these headers to include the
zephyr/
prefix in their file names and updating the include paths in source files accordingly.Additionally, ensure that the legacy include paths remains compatible during this transition and update the migration and release notes with details about this change and any necessary mitigation steps for users.
Detailed RFC
The task involves modifying CMake files and scripts to output generated headers in the
include/generated/zephyr/
directory, updating dependencies on these headers accordingly, changing include paths for in-tree sources, creating a compatibility Kconfig for uninterrupted user application builds, and updating migration and release notes with details on this change and its mitigation steps.Proposed change (Detailed)
include/generated/zephyr/
directoryinclude/generated/zephyr/
directoryzephyr/<header.h>
Dependencies
version.h
- take 1 thesofproject/sof#8459version.h
percepio/percepio#5version.h
percepio/percepio#6version.h
percepio#10Concerns and Unresolved Questions
N/A
Alternatives
N/A
The text was updated successfully, but these errors were encountered: