Skip to content

Simplify build.rs#79

Merged
chrysn merged 4 commits intomainfrom
simplify-build
Feb 1, 2024
Merged

Simplify build.rs#79
chrysn merged 4 commits intomainfrom
simplify-build

Conversation

@chrysn
Copy link
Copy Markdown
Member

@chrysn chrysn commented Jan 31, 2024

The main change in this PR is that instead of relying on riot-sys to export various pre-processed data, we just find riotbuild.h (which conveniently is an exported environment variable) and dig right into that.

This will allow riot-sys to no longer links="riot-sys", and untangles the build steps. It may also speed things up, because now riot-wrappers will rebuild precisely when riotbuild.h changes.

On the downside, this has no provisions for further code dependent markers, which have in the past helped us across C API changes. A possible step forward on that is to just look at the relevant file in RIOTBASE to determine whether it contains a marker string -- also a way more direct method.

All RIOT versions that did not have the expected values there have long
been unsupported.
This removes all dependencies on `link=` exported DEP_RIOT_SYS_
variables infavor of parsing riotbuild.h.
@chrysn
Copy link
Copy Markdown
Member Author

chrysn commented Jan 31, 2024

With the latest additions this also does away with (long inaccurate) MSRV information.

chrysn added a commit to RIOT-OS/rust-riot-sys that referenced this pull request Jan 31, 2024
The CC/CFLAGS are thus not exported any more (riot-wrappers doesn't need
them since [79]), and the modules list is not neede any more because it
was only taken in to be forwarded.

[79]: RIOT-OS/rust-riot-wrappers#79
@chrysn chrysn merged commit 9d2068a into main Feb 1, 2024
@chrysn
Copy link
Copy Markdown
Member Author

chrysn commented Feb 1, 2024

Merged as this is useful around RIOT-OS/RIOT#20088, and would break RIOT-OS/RIOT#20319 if done later.

@chrysn chrysn deleted the simplify-build branch February 1, 2024 12:28
chrysn added a commit that referenced this pull request Oct 17, 2024
While [PR20900] provides a compatibility .hdr accessor through a union,
that trick is not available through bindgen or c2rust, which all
introduce a dummy-named field for the anonymous union. Instead, we
follow the path set out by [PR79] and introspect the source file.

[PR20900]: RIOT-OS/RIOT#20900
[PR79]: #79

Co-Authored-By: Marian Buschsieweke <marian.buschsieweke@ml-pa.com>
chrysn added a commit that referenced this pull request Oct 17, 2024
While [PR20900] provides a compatibility .hdr accessor through a union,
that trick is not available through bindgen or c2rust, which all
introduce a dummy-named field for the anonymous union. Instead, we
follow the path set out by [PR79] and introspect the source file.

[PR20900]: RIOT-OS/RIOT#20900
[PR79]: #79

Co-Authored-By: Marian Buschsieweke <marian.buschsieweke@ml-pa.com>
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