Skip to content

Commit 7d66651

Browse files
committed
[RFC] make: split global linker and compile flags
Future emscripten versions warn if link-only options are set during compilation. RFC: Alternatively, do not set LDFLAGS globally only at the final step as this is the only instance of linking (currently at least).
1 parent 8cad385 commit 7d66651

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Makefile

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

7-
GLOBAL_CFLAGS:=-O3 -s ENVIRONMENT=web,webview
7+
GLOBAL_CFLAGS:=-O3
8+
GLOBAL_LDFLAGS:=-s ENVIRONMENT=web,webview
9+
export LDFLAGS = $(GLOBAL_LDFLAGS)
810

911
all: subtitleoctopus
1012

@@ -158,7 +160,6 @@ $(DIST_DIR)/lib/libharfbuzz.a: build/lib/freetype/build_hb/dist_hb/lib/libfreety
158160
-s NO_EXIT_RUNTIME=1 \
159161
-s MODULARIZE=1 \
160162
" \
161-
LDFLAGS="" \
162163
--prefix="$(DIST_DIR)" \
163164
--host=x86-none-linux \
164165
--build=x86_64 \

0 commit comments

Comments
 (0)