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

Unclear where to pass build args to Cargo #51

Closed
cletustboone opened this issue May 24, 2022 · 2 comments
Closed

Unclear where to pass build args to Cargo #51

cletustboone opened this issue May 24, 2022 · 2 comments

Comments

@cletustboone
Copy link

The generated recipe never actually invokes cargo directly, so where is that done?

I'd like to be able to pass --features "feat1, feat2, feat3" when the code is actually built. This is probably due to my lack of understanding of Yocto in general. Where should I be passing feature flags for conditional compilation? Is this outside the scope of cargo bitbake?

@cesar-pa
Copy link

You can do it adding a .inc file to your layer that includes your features like this:

CARGO_BUILD_FLAGS += " --features feat1"

@cletustboone
Copy link
Author

I've verified this works, by the way. Closing the issue unless it's better to leave it open for others with the same question.

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

No branches or pull requests

2 participants