aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrances Wingerter <wingerter@google.com>2024-02-23 17:42:02 -0500
committerStephen Crane <cranes@google.com>2024-03-07 01:50:23 +0000
commit15ea577a888a0252cff1654710867073294657a8 (patch)
treed3ba52c5e6a21089acb402de220b9dd4d284785d
parent558c867df9258f23dc65751644b9a19cdcce65dd (diff)
downloadcommon-15ea577a888a0252cff1654710867073294657a8.tar.gz
build: invoke bindgen from the kernel
Bug: 304850822 Change-Id: I4c0227d0c08054af029db2250cdb2d91f2063a8c
-rw-r--r--make/module.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/make/module.mk b/make/module.mk
index 096ce3d7..16c03612 100644
--- a/make/module.mk
+++ b/make/module.mk
@@ -232,6 +232,11 @@ ifeq ($(MODULE_CRATE_NAME),)
$(error rust module $(MODULE) does not set MODULE_CRATE_NAME)
endif
+# Generate Rust bindings with bindgen if requested
+ifneq ($(strip $(MODULE_BINDGEN_SRC_HEADER)),)
+include make/bindgen.mk
+endif
+
# library and module deps are set mutually exclusively, so it's safe to simply
# concatenate them to use whichever is set
MODULE_ALL_DEPS := $(MODULE_LIBRARY_DEPS) $(MODULE_LIBRARY_EXPORTED_DEPS) $(MODULE_DEPS)