Fix Wasm build

This commit is contained in:
Ingvar Stepanyan
2023-08-05 19:21:03 +01:00
parent c80c04f006
commit 6c693186c2
4 changed files with 7 additions and 10 deletions

View File

@@ -5,7 +5,7 @@ export LDFLAGS += -L$(SYSROOT)/lib
export ACLOCAL_PATH := $(SYSROOT)/share/aclocal:$(ACLOCAL_PATH)
# Common linking flags for all targets.
export LDFLAGS += -s DYNAMIC_EXECUTION=0 -s AUTO_JS_LIBRARIES=0 -s AUTO_NATIVE_LIBRARIES=0 -s ENVIRONMENT=web,worker
export LDFLAGS += -s DYNAMIC_EXECUTION=0 -s AUTO_JS_LIBRARIES=0 -s AUTO_NATIVE_LIBRARIES=0
# Common compilation & linking flags for all langs and targets.
COMMON_FLAGS = -Os -flto
@@ -17,7 +17,7 @@ export LDFLAGS += $(COMMON_FLAGS)
build/libapi.mjs: src/api.o $(SYSROOT)/lib/libltdl.la $(SYSROOT)/lib/libgphoto2.la
libtool --verbose --mode=link $(LD) $(LDFLAGS) -o $@ $+ \
-fexceptions --bind -s ASYNCIFY -s ALLOW_MEMORY_GROWTH \
-fexceptions --bind -s ASYNCIFY -s ALLOW_MEMORY_GROWTH -s ENVIRONMENT=web,worker \
-dlpreopen $(SYSROOT)/lib/libgphoto2/2.5.28.1/ptp2.la \
-dlpreopen $(SYSROOT)/lib/libgphoto2_port/0.12.0/usb1.la