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

Tidy per-ext check-cfg flags #208

Merged
merged 1 commit into from
May 7, 2024

Conversation

jsgf
Copy link
Contributor

@jsgf jsgf commented May 7, 2024

Emit cargo::rustc-check-cfg=CHECK_CFG in build.rs so that they can be cross-checked even if cfg option itself isn't set.

@jsgf jsgf requested a review from a team as a code owner May 7, 2024 01:18
@jsgf
Copy link
Contributor Author

jsgf commented May 7, 2024

This is a subset of #205, aside from (I think) handling the riscv{ext} cfg flags better.

println!("cargo:rustc-check-cfg=cfg(riscv)");
println!("cargo:rustc-check-cfg=cfg(riscv32)");
println!("cargo:rustc-check-cfg=cfg(riscv64)");
for ext in ['i', 'e', 'm', 'a', 'f', 'd', 'g', 'c'] {
Copy link
Contributor

Choose a reason for hiding this comment

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

I like this approach. Could you open a new PR with this modification, please? I think the rest of the crates are already fixed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I just recycled this PR.

@jsgf jsgf changed the title Fix nightly CI by adding --check-cfg flags Tidy per-ext check-cfg flags May 7, 2024
@jsgf
Copy link
Contributor Author

jsgf commented May 7, 2024

Ok rebased and just reduced to using a loop for per-ext checks.

Copy link
Contributor

@romancardenas romancardenas left a comment

Choose a reason for hiding this comment

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

LGTM

@romancardenas romancardenas added this pull request to the merge queue May 7, 2024
Merged via the queue into rust-embedded:master with commit ad8a0bb May 7, 2024
96 of 97 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants