apache / nuttx-apps

Apache NuttX Apps is a collection of tools, shells, network utilities, libraries, interpreters and can be used with the NuttX RTOS
https://nuttx.apache.org/
Apache License 2.0
264 stars 490 forks source link

Make.defs:make all AROBJS and OBJS batch cleaned in Application #2343

Closed xuxin930 closed 3 months ago

xuxin930 commented 3 months ago

Summary

hi @xiaoxiang781216 @anchao I saw the issue discussed in this PR https://github.com/apache/nuttx/pull/11997 about ltp failure we previously used batch splitting to solve the problem of argument too long during compilation. but there is a problem here in nuttx/tools/Config.mk application OBJS clean call CLEAN macro defined in nuttx/tools/Config.mk variables are expand directly within the marco.

https://github.com/apache/nuttx/blob/806d783fd6dab9cb4de79da2516e9ece71b4efdc/tools/Config.mk#L597-L601

this is no problem in the nuttx call, because the obj generated by nuttx compilation definitely does not have a suffix. however, there is uncertainty in the obj expansion of the Applications call.


This patch follows the previous design of batch splitting and performs batch deletion. and at the same time, reset the OBJS variables , $(OBJS) remove in Application CLEAN before CLEANAROBJS:

clean::
   $(call DELFILE, .built)
   $(call CLEANAROBJS)
   $(call CLEAN)

I plan to keep OBJS CLEAN in non-apps build here, delete and reset OBJS in batches in apps build.

Impact

make distclean

Testing

CI build