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

Add a basic test crate for no_std #140

Merged
merged 1 commit into from
Aug 11, 2019
Merged

Add a basic test crate for no_std #140

merged 1 commit into from
Aug 11, 2019

Conversation

Ogeon
Copy link
Owner

@Ogeon Ogeon commented Aug 11, 2019

It's very bare bones, but will hopefully get the job done.

Closes #139

@Ogeon
Copy link
Owner Author

Ogeon commented Aug 11, 2019

bors r+

bors bot added a commit that referenced this pull request Aug 11, 2019
140: Add a basic test crate for no_std r=Ogeon a=Ogeon

It's very bare bones, but will hopefully get the job done.

Closes #139

Co-authored-by: Erik Hedvall <erikwhedvall@gmail.com>
@bors
Copy link
Contributor

bors bot commented Aug 11, 2019

Build succeeded

@bors bors bot merged commit f81053f into master Aug 11, 2019
@bors bors bot deleted the no_std_test branch August 11, 2019 14:37
@CryZe
Copy link
Contributor

CryZe commented Aug 11, 2019

Whoops I missed this PR. You definitely need to build against a target that doesn't have std to properly check for it as no_std crates can depend on std crates (for whatever reason), so you don't know if all your dependencies are properly no_std unless you compile against a target that doesn't even have it.

@Ogeon
Copy link
Owner Author

Ogeon commented Aug 11, 2019

Ouch, alright, I though it worked because it failed to compile (duplicate symbols) when I enabled std. Maybe that's not reliable enough. Do you have an example of how to do it in a better way?

@CryZe
Copy link
Contributor

CryZe commented Aug 11, 2019

I guess what you have is fine, but I'd additionally also compile it for --target thumbv6m-none-eabi (and then probably just not execute it, unless you want to go through the effort with qemu)

@Ogeon
Copy link
Owner Author

Ogeon commented Aug 11, 2019

I'm fine with not executing it for now. That's already how it's done here. I will try adding a test for thumbv6m-none-eabi too. Thanks for pointing it out!

bors bot added a commit that referenced this pull request Aug 11, 2019
141: Also test no_std with a target without std support r=Ogeon a=Ogeon

As suggested in #140 (comment).

Co-authored-by: Erik Hedvall <erikwhedvall@gmail.com>
@Ogeon Ogeon added the internal An internal change that will not be shown in release notes label Jul 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal change that will not be shown in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a test crate for testing no_std builds
2 participants