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 cfg evaluator for the non-Cargo builds #1001

Merged
merged 2 commits into from Jan 18, 2022
Merged

Add a cfg evaluator for the non-Cargo builds #1001

merged 2 commits into from Jan 18, 2022

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Jan 18, 2022

Conditional compilation support for non-Cargo builds (part of #989). This is the non-Cargo followup to #1000. The C++ code generator evaluates #[cfg(...)] attributes by taking flags equivalent to rustc's --cfg flag:

$ cxxbridge --cfg 'unix' --cfg 'target_arch="x86_64"' --cfg 'target_endian="little"' --cfg 'test=false'

@dtolnay dtolnay merged commit d92004f into master Jan 18, 2022
@dtolnay dtolnay deleted the cfg branch January 18, 2022 23: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.

None yet

1 participant