Add --wrap-static-fns support to rust_bindgen
The bindgen target needs wrap_static_fns enabled and then the target
consuming the bindgen target needs a separate dependency. It would have
been cleaner if it generated a single mixed_shared_library, but the Rust
ecosystem has settled on a much more manual bindgen strategy, where the
bindgen output is include!ed into another crate. This means that we need
to export an action target with the file, making the generated
shared_library target separate.
Start using this in BoringSSL, which fills in a few missing bindings.
(bssl-crypto happens not to be using inline functions right now, which
is why it's working.)
Fixed: 40286662
Change-Id: I3b995d5b1e82e80833dab74be81096c80c7a7d0e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5296887
Reviewed-by: Adrian Taylor <adetaylor@chromium.org>
Commit-Queue: David Benjamin <davidben@chromium.org>
Auto-Submit: David Benjamin <davidben@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1262785}
NOKEYCHECK=True
GitOrigin-RevId: d1a32040aa3a20061f42740c723dc6f3ba244260
diff --git a/BUILD.gn b/BUILD.gn
index 5691d26..214a191 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -73,8 +73,8 @@
"blocklist-function=OPENSSL_vasprintf",
"rustified-enum=point_conversion_form_t",
"allowlist-file=.*[[:punct:]]include[[:punct:]]openssl[[:punct:]].*\\.h",
- "allowlist-file=.*[[:punct:]]rust_wrapper\\.h",
]
+ wrap_static_fns = true
visibility = [ ":*" ] # private, should only be exposed through bssl_crypto
}
@@ -87,6 +87,7 @@
deps = [
":boringssl",
":raw_bssl_sys_bindings",
+ ":raw_bssl_sys_bindings_static_fns",
]
visibility = [