Skip to content

Add BuildTarget and Deependency keyword for search directories for #embed#15964

Open
dcbaker wants to merge 8 commits into
mesonbuild:masterfrom
dcbaker:submit/embed-dir
Open

Add BuildTarget and Deependency keyword for search directories for #embed#15964
dcbaker wants to merge 8 commits into
mesonbuild:masterfrom
dcbaker:submit/embed-dir

Conversation

@dcbaker

@dcbaker dcbaker commented Jun 27, 2026

Copy link
Copy Markdown
Member

C23 and C++26 adds a new #embed pre-processor directive, and a new set of search paths. GCC and Clang implement these features, and have added a new command line argument --embed-dir=$dir for updating this path.

This MR adds support for that in dependencies and targets in the form of embed_directories keyword argument. This allows a portable mechanism just like include_directories and d_import_dirs.

@dcbaker dcbaker added this to the 1.13 milestone Jun 27, 2026
@dcbaker dcbaker requested a review from jpakkane as a code owner June 27, 2026 04:10
dcbaker added 5 commits June 26, 2026 21:14
This is added to `declare_dependency()` and `build_target()`, which is
meant to be used for C23 and C++26 `#embed` support.
This provides the arguments for compilers to pass search paths for C23
and c++26 `#embed` search paths.
@dcbaker dcbaker force-pushed the submit/embed-dir branch from d6e2c0e to c1a47bc Compare June 27, 2026 04:14
@dcbaker

dcbaker commented Jun 27, 2026

Copy link
Copy Markdown
Member Author

It is expected that the new unit test will fail, as it expects Meson to have version >= 1.13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant