This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new a22aeb00e tools: Lock wasm archive during ar rcs
a22aeb00e is described below

commit a22aeb00ed9b865ab86778f984b618d7f9cfe9c6
Author: Huang Qi <[email protected]>
AuthorDate: Tue Sep 12 10:28:41 2023 +0800

    tools: Lock wasm archive during ar rcs
    
    Fix issues with multi thread compilation.
    
    Signed-off-by: Huang Qi <[email protected]>
---
 tools/Wasm.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/Wasm.mk b/tools/Wasm.mk
index 92d308124..6314f652a 100644
--- a/tools/Wasm.mk
+++ b/tools/Wasm.mk
@@ -143,7 +143,7 @@ $(WOBJS): %.c$(SUFFIX).wo : %.c
 
 $(WBIN): $(WOBJS)
        $(shell mkdir -p $(APPDIR)/wasm)
-       $(Q) $(WAR) $@ $(filter-out $(MAINSRC:=$(SUFFIX).wo),$^)
+       $(Q) flock $(WBIN).lock -c '$(WAR) $@ $(filter-out 
$(MAINSRC:=$(SUFFIX).wo),$^)'
        $(foreach main,$(MAINSRC), \
          $(eval progname=$(strip $(PROGNAME_$(main:=$(SUFFIX)$(OBJEXT))))) \
          $(eval dstname=$(shell echo $(main:=$(SUFFIX).wo) | sed -e 
's/\//_/g')) \

Reply via email to