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 BINDGEN_EXTRA_CLANG_ARGS env variable #1537

Merged
merged 1 commit into from
Mar 15, 2019
Merged

Add BINDGEN_EXTRA_CLANG_ARGS env variable #1537

merged 1 commit into from
Mar 15, 2019

Conversation

jhwgh1968
Copy link
Contributor

@jhwgh1968 jhwgh1968 commented Mar 11, 2019

Similar to users in #1229 , my cross compiler needed a way to pass --sysroot <custom chroot path> to all invocations of clang without modifying Rust crate sources. After finding ways to do that with environment variables for the pkgconfig, cmake, and cc crates, I couldn't find one for bindgen. So here it is!

While I think it's an important fix for corner cases, I've chosen not to document it since it might be a footgun for new users. If you disagree, I'd happily add a docstring if I could get guidance on where.

Since they commented on #1229:
r? @fitzgen

@highfive
Copy link

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @fitzgen (or someone else) soon.

Copy link
Contributor

@emilio emilio left a comment

Choose a reason for hiding this comment

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

Overall it seems ok. I think documenting it would be better, but no huge preference. Needs some changes to the test at least.

tests/tests.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
@jhwgh1968
Copy link
Contributor Author

I think I have fixed both comments, @emilio. Thanks for catching those issues!

src/lib.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@emilio emilio left a comment

Choose a reason for hiding this comment

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

Thanks, looks good to me :)

@emilio emilio merged commit ab5d31a into rust-lang:master Mar 15, 2019
@jhwgh1968 jhwgh1968 deleted the clang_env_args branch March 16, 2019 03:32
@jhwgh1968
Copy link
Contributor Author

I'd like to get a crates.io version with this change in it. When is the 0.48.2 release?

@emilio
Copy link
Contributor

emilio commented Mar 26, 2019

I'll try to publish something this week :)

@emilio
Copy link
Contributor

emilio commented Mar 27, 2019

#1545

tmfink added a commit to tmfink/rust-bindgen that referenced this pull request Jun 5, 2020
Feature was originally introduced in pull-request rust-lang#1537
emilio pushed a commit that referenced this pull request Jun 5, 2020
Feature was originally introduced in pull-request #1537
Kixunil pushed a commit to Kixunil/rust-bindgen that referenced this pull request Nov 3, 2020
Feature was originally introduced in pull-request rust-lang#1537
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.

4 participants