@@ -39,7 +39,7 @@ WASM_FS=false
39
39
# https://github.com/WebAssembly/exception-handling
40
40
WASM_EH=false
41
41
42
- # Emit instructions for the new Wasm EH proposal with exnref
42
+ # Emit instructions for the standardized Wasm EH proposal with exnref
43
43
# (adopted on Oct 2023), disabled by default
44
44
# https://github.com/WebAssembly/exception-handling/issues/280
45
45
WASM_EXNREF=false
118
118
# export LDFLAGS+=" --source-map-base http://localhost:3000/lib/"
119
119
120
120
# Rust flags
121
+ # TODO(kleisauke): Remove +bulk-memory,+nontrapping-fptoint once Rust updates LLVM to 20, see:
122
+ # https://github.com/llvm/llvm-project/commit/1bc2cd98c58a1059170dc38697c7a29a8e21160b
121
123
export RUSTFLAGS=" -Ctarget-feature=+atomics,+bulk-memory,+nontrapping-fptoint -Zdefault-visibility=hidden"
122
124
123
125
# Common compiler flags
@@ -128,13 +130,19 @@ if [ "$LTO" = "true" ]; then
128
130
fi
129
131
if [ " $WASM_EH " = " true" ]; then
130
132
COMMON_FLAGS+=" -fwasm-exceptions -sSUPPORT_LONGJMP=wasm"
131
- # https://github.com/rust-lang/rust/issues/112195
132
- export RUSTFLAGS+=" -Cllvm-args=-enable-emscripten-cxx-exceptions=0 -Cllvm-args=-wasm-enable-sjlj"
133
+ # https://github.com/rust-lang/rust/pull/131830
134
+ export RUSTFLAGS+=" -Zemscripten-wasm-eh"
135
+ if [ " $WASM_EXNREF " = " true" ]; then
136
+ COMMON_FLAGS+=" -sWASM_LEGACY_EXCEPTIONS=0"
137
+ # TODO(kleisauke): Switch to -wasm-use-legacy-eh=0 once Rust updates LLVM to 20, see:
138
+ # https://github.com/llvm/llvm-project/commit/a8e1135baa9074f7c088c8e1999561f88699b56e
139
+ export RUSTFLAGS+=" -Cllvm-args=-wasm-enable-exnref"
140
+ fi
133
141
else
134
142
COMMON_FLAGS+=" -fexceptions"
135
143
fi
136
144
137
- export CFLAGS=" $COMMON_FLAGS -mnontrapping-fptoint - fvisibility=hidden"
145
+ export CFLAGS=" $COMMON_FLAGS -fvisibility=hidden"
138
146
if [ " $SIMD " = " true" ]; then
139
147
export CFLAGS+=" -msimd128 -DWASM_SIMD_COMPAT_SLOW"
140
148
export RUSTFLAGS+=" -Ctarget-feature=+simd128"
@@ -144,8 +152,7 @@ if [ "$PIC" = "true" ]; then export CFLAGS+=" -fPIC"; fi
144
152
export CXXFLAGS=" $CFLAGS "
145
153
146
154
export LDFLAGS=" $COMMON_FLAGS -L$TARGET /lib -sAUTO_JS_LIBRARIES=0 -sAUTO_NATIVE_LIBRARIES=0"
147
- if [ " $WASM_BIGINT " = " true" ]; then export LDFLAGS+=" -sWASM_BIGINT" ; fi
148
- if [ " $WASM_EXNREF " = " true" ]; then export LDFLAGS+=" -sWASM_EXNREF" ; fi
155
+ if [ " $WASM_BIGINT " = " false" ]; then export LDFLAGS+=" -sWASM_BIGINT=0" ; fi
149
156
150
157
# Build paths
151
158
export CPATH=" $TARGET /include"
@@ -177,24 +184,24 @@ export RUSTFLAGS+=" --remap-path-prefix=$CARGO_HOME/registry/src/="
177
184
export RUSTFLAGS+=" --remap-path-prefix=$DEPS /="
178
185
179
186
# Dependency version numbers
180
- VERSION_ZLIB_NG=2.2.2 # https://github.com/zlib-ng/zlib-ng
187
+ VERSION_ZLIB_NG=2.2.3 # https://github.com/zlib-ng/zlib-ng
181
188
VERSION_FFI=3.4.6 # https://github.com/libffi/libffi
182
- VERSION_GLIB=2.83.0 # https://gitlab.gnome.org/GNOME/glib
189
+ VERSION_GLIB=2.83.3 # https://gitlab.gnome.org/GNOME/glib
183
190
VERSION_EXPAT=2.6.4 # https://github.com/libexpat/libexpat
184
- VERSION_EXIF=0.6.24 # https://github.com/libexif/libexif
191
+ VERSION_EXIF=0.6.25 # https://github.com/libexif/libexif
185
192
VERSION_LCMS2=2.16 # https://github.com/mm2/Little-CMS
186
193
VERSION_HWY=1.2.0 # https://github.com/google/highway
187
194
VERSION_BROTLI=1.1.0 # https://github.com/google/brotli
188
195
VERSION_MOZJPEG=4.1.5 # https://github.com/mozilla/mozjpeg
189
- VERSION_JXL=0.11.0 # https://github.com/libjxl/libjxl
196
+ VERSION_JXL=0.11.1 # https://github.com/libjxl/libjxl
190
197
VERSION_SPNG=0.7.4 # https://github.com/randy408/libspng
191
198
VERSION_IMAGEQUANT=2.4.1 # https://github.com/lovell/libimagequant
192
199
VERSION_CGIF=0.4.1 # https://github.com/dloebl/cgif
193
- VERSION_WEBP=1.4 .0 # https://chromium.googlesource.com/webm/libwebp
200
+ VERSION_WEBP=1.5 .0 # https://chromium.googlesource.com/webm/libwebp
194
201
VERSION_TIFF=4.7.0 # https://gitlab.com/libtiff/libtiff
195
202
VERSION_RESVG=0.44.0 # https://github.com/linebender/resvg
196
203
VERSION_AOM=3.11.0 # https://aomedia.googlesource.com/aom
197
- VERSION_HEIF=1.19.3 # https://github.com/strukturag/libheif
204
+ VERSION_HEIF=1.19.5 # https://github.com/strukturag/libheif
198
205
VERSION_VIPS=8.16.0 # https://github.com/libvips/libvips
199
206
200
207
VERSION_EMSCRIPTEN=" $( emcc -dumpversion) "
@@ -302,7 +309,7 @@ node --version
302
309
[ -f " $TARGET /lib/pkgconfig/libexif.pc" ] || (
303
310
stage " Compiling exif"
304
311
mkdir $DEPS /exif
305
- curl -Ls https://github.com/libexif/libexif/releases/download/v$VERSION_EXIF /libexif-$VERSION_EXIF .tar.bz2 | tar xjC $DEPS /exif --strip-components=1
312
+ curl -Ls https://github.com/libexif/libexif/releases/download/v$VERSION_EXIF /libexif-$VERSION_EXIF .tar.xz | tar xJC $DEPS /exif --strip-components=1
306
313
cd $DEPS /exif
307
314
emconfigure ./configure --host=$CHOST --prefix=$TARGET --enable-static --disable-shared --disable-dependency-tracking \
308
315
--disable-docs --disable-nls --without-libiconv-prefix --without-libintl-prefix CPPFLAGS=" -DNO_VERBOSE_TAG_DATA"
@@ -447,13 +454,8 @@ node --version
447
454
# Vendor dir doesn't work with -Zbuild-std due to https://github.com/rust-lang/wg-cargo-std-aware/issues/23
448
455
# Just delete the config so that all deps are downloaded from the internet
449
456
rm .cargo/config
457
+ # Update and regenerate the lockfile for zune-jpeg
450
458
# https://github.com/etemesi254/zune-image/pull/242
451
- # https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-section
452
- cat >> Cargo.toml << EOL
453
- [patch.crates-io]
454
- zune-jpeg = { git = "https://github.com/etemesi254/zune-image.git", rev = "80e1957" }
455
- EOL
456
- # Regenerate the lockfile for zune-jpeg
457
459
cargo update zune-jpeg
458
460
# We don't want to build the shared library
459
461
sed -i ' /^crate-type =/s/"cdylib", //' crates/c-api/Cargo.toml
0 commit comments