From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: gpu: nova-core: emit Rust metadata for dependent modules Date: Thu, 04 Jun 2026 16:23:29 +1000 Message-ID: In-Reply-To: <20260530-nova-exports-v3-3-1202aa339ef7@nvidia.com> References: <20260530-nova-exports-v3-0-1202aa339ef7@nvidia.com> <20260530-nova-exports-v3-3-1202aa339ef7@nvidia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Status: Looks good** This adds Makefile rules to produce `libnova_core.rmeta` so dependent Rust = modules can use `--extern nova_core=3D` for compile-time type resolut= ion. The build is isolated in `.nova_core_rmeta/` to avoid racing with the main = `nova_core.o` compilation on rustc's intermediate file names =E2=80=94 this= is a real problem since rustc writes intermediate objects with determinist= ic names. The implementation: ```makefile cmd_rustc_rmeta_rs =3D mkdir -p $(dir $@); \ $(rust_common_cmd) --emit=3Dmetadata=3D$@ \ --emit=3Dobj=3D$(basename $@).o $<; \ rm -f $(basename $@).o ``` The `--emit=3Dobj=3D...` followed by `rm -f` is necessary because some rust= c versions require code generation to produce correct metadata. The discard= ed `.o` is placed in the private directory so it doesn't collide. The two-step approach (private build =E2=86=92 `if_changed,copy` to stable = path) ensures consumers see a stable path and the copy only happens when co= ntent changes. The `private __modname`, `part-of-builtin`, and `part-of-mod= ule` settings correctly replicate the build context. The downside is compiling nova-core effectively twice (once for .o, once fo= r .rmeta), but this is acceptable for a temporary workaround. --- Generated by Claude Code Patch Reviewer