File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 129129 emmake make install
130130
131131cd ..
132+
133+
134+ # ----------------Build shared libraries from static archives --------------#
135+
136+
137+ emcc -shared -sSIDE_MODULE=2 -o " $WASM_LIBRARY_DIR /lib/libgmp.so" \
138+ -Wl,--whole-archive " $WASM_LIBRARY_DIR /lib/libgmp.a" -Wl,--no-whole-archive
139+
140+ emcc -shared -sSIDE_MODULE=2 -o " $WASM_LIBRARY_DIR /lib/libmpfr.so" \
141+ -Wl,--whole-archive " $WASM_LIBRARY_DIR /lib/libmpfr.a" -Wl,--no-whole-archive \
142+ -L" $WASM_LIBRARY_DIR /lib" -lgmp
143+
144+ emcc -shared -sSIDE_MODULE=2 -o " $WASM_LIBRARY_DIR /lib/libflint.so" \
145+ -Wl,--whole-archive " $WASM_LIBRARY_DIR /lib/libflint.a" -Wl,--no-whole-archive \
146+ -L" $WASM_LIBRARY_DIR /lib" -lmpfr -lgmp
Original file line number Diff line number Diff line change @@ -179,15 +179,16 @@ repair-wheel-command = [
179179
180180[tool .cibuildwheel .pyodide ]
181181before-all = " bin/cibw_before_all_pyodide.sh"
182- before-build = " pip install wheel"
182+ before-build = " pip install wheel auditwheel_emscripten "
183183
184184# This needs to be kept in sync with the Pyodide row in
185185# .github/workflows/buildwheel.yml. The Pyodide version pins both an
186186# Emscripten version and a CPython minor version. The command
187187# `pyodide xbuildenv search --all` shows the compatible combinations.
188188pyodide-version = " 0.28.2"
189189
190- # GMP, MPFR, and FLINT are built as static libraries for Pyodide.
190+ # GMP, MPFR, and FLINT are built as shared libraries for Pyodide and bundled
191+ # into the wheel.
191192repair-wheel-command = [
192193""" python bin/cibw_repair_wheel_licenses.py "{wheel}" \
193194 --license LGPL-3.0-or-later \
@@ -198,7 +199,7 @@ repair-wheel-command = [
198199 --license-file 'wasm-library-dir/src/flint-*/COPYING:python-flint.libs/flint-*/COPYING' \
199200 --license-file 'wasm-library-dir/src/flint-*/COPYING.LESSER:python-flint.libs/flint-*/COPYING.LESSER' \
200201""" ,
201- " cp \" {wheel} \" \" {dest_dir} \" " ,
202+ " pyodide auditwheel repair --libdir wasm-library-dir --output-dir {dest_dir} {wheel} " ,
202203]
203204
204205[tool .cibuildwheel .pyodide .environment ]
You can’t perform that action at this time.
0 commit comments