Skip to content

Commit a87ba46

Browse files
committed
Fix build with --enable-lto
1 parent 3bfa3d1 commit a87ba46

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ export CXXFLAGS="$CFLAGS"
170170

171171
export LDFLAGS="$COMMON_FLAGS -L$TARGET/lib -sAUTO_JS_LIBRARIES=0 -sAUTO_NATIVE_LIBRARIES=0"
172172
if [ "$WASM_BIGINT" = "true" ]; then export LDFLAGS+=" -sWASM_BIGINT"; fi
173+
# FIXME(kleisauke): Workaround for: https://github.com/emscripten-core/emscripten/issues/16836#issuecomment-1556187350
174+
if [ "$LTO" = "true" ]; then export LDFLAGS+=" -Wl,-u,htonl"; fi
173175

174176
# Build paths
175177
export CPATH="$TARGET/include"

0 commit comments

Comments
 (0)