-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh-127629: Add ctypes to the Emscripten build
- Loading branch information
Showing
2 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
set +e | ||
|
||
export CFLAGS="-O2 -fPIC -DWASM_BIGINT" | ||
export CXXFLAGS="$CFLAGS" | ||
|
||
# Build paths | ||
export CPATH="$PREFIX/include" | ||
export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig" | ||
export EM_PKG_CONFIG_PATH="$PKG_CONFIG_PATH" | ||
|
||
# Specific variables for cross-compilation | ||
export CHOST="wasm32-unknown-linux" # wasm32-unknown-emscripten | ||
|
||
autoreconf -fi | ||
emconfigure ./configure --host=$CHOST --prefix="$PREFIX" --enable-static --disable-shared --disable-dependency-tracking \ | ||
--disable-builddir --disable-multi-os-directory --disable-raw-api --disable-docs | ||
|
||
make install | ||
# Some forgotten headers? | ||
cp fficonfig.h $PREFIX/include/ | ||
cp include/ffi_common.h $PREFIX/include/ |