-
-
Notifications
You must be signed in to change notification settings - Fork 765
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
Conversation
4ab456e
to
da286ca
Compare
f4bbba8
to
8f28aa9
Compare
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.
} | ||
|
||
#[cfg(not(feature = "bindgen"))] | ||
pub fn run_boringssl(include_dirs: &[PathBuf]) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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
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.