Emit nova-core's crate metadata (libnova_core.rmeta) so that nova-drm can import nova-core's types and functions at compile time.
This is intended to be a workaround until the build system supports Rust cross-crate dependencies natively. Signed-off-by: Alexandre Courbot <[email protected]> --- drivers/gpu/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/Makefile b/drivers/gpu/Makefile index 67d51b7f3f55..13c96aa57033 100644 --- a/drivers/gpu/Makefile +++ b/drivers/gpu/Makefile @@ -56,3 +56,7 @@ $(obj)/nova-core/nova_core_exports.o: private cmd_gensymtypes_c = \ $(if $(KBUILD_SYMTYPES), --symtypes $(@:.o=.symtypes),) \ $(obj)/nova-core/nova_core.o endif + +# Output nova-core's crate metadata for use by nova-drm at compile time. +RUSTFLAGS_nova-core/nova_core.o += \ + --emit=metadata=$(objtree)/$(obj)/nova-core/libnova_core.rmeta -- 2.54.0
