Sha256: fab48a9ce33b894a333a7830f7866d9c6fa6687eb23d1f75e54750463cee7a8f

Contents?: true

Size: 1.37 KB

Versions: 1581

Compression:

Stored size: 1.37 KB

Contents

#!/bin/bash

# JS BigInt to Wasm i64 integration, disabled by default
WASM_BIGINT=false

emcc_exists="$(command -v emcc)"
if [ ! "${emcc_exists}" ]; then
  echo "Emscripten not on path"
  exit 1
fi

# Parse arguments
while [ $# -gt 0 ]; do
  case $1 in
  --wasm-bigint) WASM_BIGINT=true ;;
  *)
    echo "ERROR: Unknown parameter: $1" >&2
    exit 1
    ;;
  esac
  shift
done

# Common compiler flags
export CFLAGS="-fPIC $EXTRA_CFLAGS"
if [ "$WASM_BIGINT" = "true" ]; then
  # We need to detect WASM_BIGINT support at compile time
  export CFLAGS+=" -DWASM_BIGINT"
fi
export CXXFLAGS="$CFLAGS -sNO_DISABLE_EXCEPTION_CATCHING $EXTRA_CXXFLAGS"
export LDFLAGS="-sEXPORTED_FUNCTIONS=_main,_malloc,_free -sALLOW_TABLE_GROWTH -sASSERTIONS -sNO_DISABLE_EXCEPTION_CATCHING"
if [ "$WASM_BIGINT" = "true" ]; then
  export LDFLAGS+=" -sWASM_BIGINT"
else
  export LDFLAGS+=" -sEXPORTED_RUNTIME_METHODS='getTempRet0,setTempRet0'"
fi

# Specific variables for cross-compilation
export CHOST="wasm32-unknown-linux" # wasm32-unknown-emscripten

autoreconf -fiv
emconfigure ./configure --prefix="$(pwd)/target" --host=$CHOST --enable-static --disable-shared \
  --disable-builddir --disable-multi-os-directory --disable-raw-api --disable-docs ||
  (cat config.log && exit 1)
make

EMMAKEN_JUST_CONFIGURE=1 emmake make check \
  RUNTESTFLAGS="LDFLAGS_FOR_TARGET='$LDFLAGS'" || (cat testsuite/libffi.log && exit 1)

Version data entries

1,581 entries across 1,580 versions & 16 rubygems

Version Path
cybrid_api_organization_ruby-0.117.21 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh
affixapi-1.1.83 vendor/bundle/ruby/3.3.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh
cybrid_api_id_ruby-0.115.140 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh
cybrid_api_organization_ruby-0.115.140 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh
cybrid_api_id_ruby-0.115.139 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh
cybrid_api_bank_ruby-0.115.139 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh
cybrid_api_organization_ruby-0.115.139 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh
cybrid_api_id_ruby-0.115.138 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh
cybrid_api_organization_ruby-0.115.138 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh
ory-client-1.11.6 vendor/bundle/ruby/2.7.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh
cybrid_api_id_ruby-0.115.137 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh
cybrid_api_bank_ruby-0.115.137 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh
cybrid_api_organization_ruby-0.115.137 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh
cybrid_api_bank_ruby-0.115.135 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh
cybrid_api_organization_ruby-0.115.135 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh
cybrid_api_id_ruby-0.115.135 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh
cybrid_api_organization_ruby-0.115.134 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh
cybrid_api_bank_ruby-0.115.134 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh
cybrid_api_id_ruby-0.115.134 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh
cybrid_api_bank_ruby-0.115.133 vendor/bundle/ruby/3.2.0/gems/ffi-1.16.3/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh