This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new e4fe1134bff arch/sim: Add dependencies for Rust cargo in make builds
e4fe1134bff is described below
commit e4fe1134bffe44d6608d1388e22d119570c29d3c
Author: Shoji Tokunaga <[email protected]>
AuthorDate: Sat May 30 02:04:15 2026 +0900
arch/sim: Add dependencies for Rust cargo in make builds
Add `EXTRA_LIB_DEPS` to the simulator nuttx target prerequisites.
This lets Make notice when an extra application library, such as a Rust
static library rebuilt by Cargo, has changed and ensures the final
simulator binary is relinked.
Signed-off-by: Shoji Tokunaga <[email protected]>
---
arch/sim/src/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/sim/src/Makefile b/arch/sim/src/Makefile
index d3857e52025..d238853df6f 100644
--- a/arch/sim/src/Makefile
+++ b/arch/sim/src/Makefile
@@ -362,6 +362,7 @@ $(foreach lib,$(notdir $(wildcard
$(APPDIR)$(DELIM)staging$(DELIM)*$(LIBEXT))),
EXTRA_LIBS := $(filter-out $(NAMEFULL_LIBS) $(NAMESPEC_LIBS),$(EXTRA_LIBS))
EXTRA_LIBS += $(wildcard $(APPDIR)$(DELIM)staging$(DELIM)*$(LIBEXT))
+EXTRA_LIB_DEPS := $(wildcard $(filter-out -%,$(EXTRA_LIBS)))
# Override in Make.defs if linker is not 'ld'
@@ -480,7 +481,7 @@ endef
# stuff doesn't work there as we expect.
# Note: _stext stuff is for CONFIG_CXX_INITIALIZE_SINIT, which in not
# necessary for macOS.
-nuttx$(EXEEXT): libarch$(LIBEXT) board/libboard$(LIBEXT) $(HEADOBJ)
$(LINKOBJS) $(HOSTOBJS) nuttx-names.dat
+nuttx$(EXEEXT): libarch$(LIBEXT) board/libboard$(LIBEXT) $(HEADOBJ)
$(LINKOBJS) $(HOSTOBJS) nuttx-names.dat $(EXTRA_LIB_DEPS)
$(Q) echo "LD: nuttx$(EXEEXT)"
$(Q) $(LD) -r $(LDLINKFLAGS) $(RELPATHS) $(EXTRA_LIBPATHS)
$(EXTRALINKCMDS) \
-o nuttx.rel $(REQUIREDOBJS) $(LDSTARTGROUP) $(RELLIBS)
$(EXTRA_LIBS) $(LDENDGROUP)