Skip to content

Commit 4e414c6

Browse files
TheOnericdmitrylyzo
authored andcommitted
fix EVAL_CTORS
EVAL_CTORS now errors when used without WASM, previosuly it was likely just silently disabled. Thus, only set it when linking with WASM. Cherry-picked from: libass@45a05db
1 parent 3f20e33 commit 4e414c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
BASE_DIR:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
55
DIST_DIR:=$(BASE_DIR)dist/libraries
66

7-
export LDFLAGS = -O3 -s EVAL_CTORS=1 -flto -s ENVIRONMENT=web,webview,worker -s NO_EXIT_RUNTIME=1 -s STRICT_JS=1
7+
export LDFLAGS = -O3 -flto -s ENVIRONMENT=web,webview,worker -s NO_EXIT_RUNTIME=1 -s STRICT_JS=1
88
export CFLAGS = -O3 -flto -s USE_PTHREADS=0
99
export CXXFLAGS = $(CFLAGS)
1010
export PKG_CONFIG_PATH = $(DIST_DIR)/lib/pkgconfig
@@ -175,6 +175,7 @@ dist/js/subtitles-octopus-worker.js: src/subtitles-octopus-worker.bc src/pre-wor
175175
--post-js src/SubOctpInterface.js \
176176
--post-js src/post-worker.js \
177177
-s WASM=1 \
178+
-s EVAL_CTORS=1 \
178179
$(EMCC_COMMON_ARGS)
179180

180181
dist/js/subtitles-octopus-worker-legacy.js: src/subtitles-octopus-worker.bc src/polyfill.js src/pre-worker.js src/SubOctpInterface.js src/post-worker.js build/lib/brotli/js/decode.js build/lib/brotli/js/polyfill.js

0 commit comments

Comments
 (0)