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

Added support for building boringssl with bindgen #1831

Merged
merged 1 commit into from
Mar 15, 2023

Conversation

alex
Copy link
Collaborator

@alex alex commented Mar 4, 2023

This allows building it without the bssl-sys crate. This is an alternative approach to fixing #1768 (in contrast to #1806).

This maintains support for using the bssl-sys crate.

@alex alex force-pushed the boring-bindgen branch 5 times, most recently from 4ab456e to da286ca Compare March 4, 2023 15:01
@alex alex marked this pull request as ready for review March 4, 2023 15:18
@alex
Copy link
Collaborator Author

alex commented Mar 4, 2023

FYI: @davidben @maurer

@alex alex force-pushed the boring-bindgen branch 2 times, most recently from f4bbba8 to 8f28aa9 Compare March 10, 2023 16:36
This allows building it without the bssl-sys crate. This is an alternative approach to fixing sfackler#1768 (in contrast to sfackler#1806).

This maintains support for using the bssl-sys crate.
@sfackler sfackler merged commit 53116f8 into sfackler:master Mar 15, 2023
}

#[cfg(not(feature = "bindgen"))]
pub fn run_boringssl(include_dirs: &[PathBuf]) {
Copy link
Owner

Choose a reason for hiding this comment

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

It seems a bit unfortunate to be duplicating all of the bindgen flags here and above. If we end up having to tweak them in the future we should probably refactor.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agreed, and yes, makes sense.

.arg("--rustified-enum=point_conversion_form_t")
.arg("--allowlist-file=.*/openssl/[^/]+\\.h")
.arg("--experimental")
.arg("--wrap-static-fns")
Copy link
Contributor

@davidben davidben Mar 15, 2023

Choose a reason for hiding this comment

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

Based on, it doesn't look like this flag works correctly in bindgen yet, so from BoringSSL's perspective, this bindings strategy is unsupported. I'd love to see a version of it that works, but bindgen isn't there yet.
https://boringssl-review.googlesource.com/c/boringssl/+/56505/8/rust/CMakeLists.txt#37

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.

3 participants