<commit_before>#!/bin/bash

suffix=so
if [ `uname -s` == "Darwin" ]; then
	suffix=dylib
fi

# compile wrapper around libogg + libvorbis + libtheora
# Warning: -O2 enables the emscripten relooper which, on current release version hangs
# on arm64 iOS devices in Vorbis decoding. Use with emscripten-fastcomp for iOS arm64!
EMCC_FAST_COMPILER=1 emcc \
  -O2 \
  --memory-init-file 0 \
  -s ASM_JS=1 \
  -s VERBOSE=1 \
  -s ERROR_ON_UNDEFINED_SYMBOLS=1 \
  -s EXPORTED_FUNCTIONS="['_OgvJsInit', '_OgvJsDestroy', '_OgvJsReceiveInput', '_OgvJsProcess', '_OgvJsDecodeFrame', '_OgvJsDecodeAudio']" \
  -Ibuild/js/root/include \
  -Lbuild/js/root/lib \
  build/js/root/lib/libogg.$suffix \
  build/js/root/lib/libvorbis.$suffix \
  build/js/root/lib/libopus.$suffix \
  build/js/root/lib/libtheoradec.$suffix \
  --js-library src/ogv-libs-mixin.js \
  -D OPUS \
  src/opus_header.c \
  src/opus_helper.c \
  src/ogv-libs.c \
  -o build/js/ogv-libs.js<commit_msg>Use new emscripten options to skip unneeded libs<commit_after>#!/bin/bash

suffix=so
if [ `uname -s` == "Darwin" ]; then
	suffix=dylib
fi

# compile wrapper around libogg + libvorbis + libtheora
# Warning: -O2 enables the emscripten relooper which, on current release version hangs
# on arm64 iOS devices in Vorbis decoding. Use with emscripten-fastcomp for iOS arm64!
EMCC_FAST_COMPILER=1 emcc \
  -O2 \
  --memory-init-file 0 \
  -s ASM_JS=1 \
  -s VERBOSE=1 \
  -s ERROR_ON_UNDEFINED_SYMBOLS=1 \
  -s NO_FILESYSTEM=1 \
  -s NO_BROWSER=1 \
  -s EXPORTED_FUNCTIONS="['_OgvJsInit', '_OgvJsDestroy', '_OgvJsReceiveInput', '_OgvJsProcess', '_OgvJsDecodeFrame', '_OgvJsDecodeAudio']" \
  -Ibuild/js/root/include \
  -Lbuild/js/root/lib \
  build/js/root/lib/libogg.$suffix \
  build/js/root/lib/libvorbis.$suffix \
  build/js/root/lib/libopus.$suffix \
  build/js/root/lib/libtheoradec.$suffix \
  --js-library src/ogv-libs-mixin.js \
  -D OPUS \
  src/opus_header.c \
  src/opus_helper.c \
  src/ogv-libs.c \
  -o build/js/ogv-libs.js
{'fraction_non_alphanumeric': 0.13897280966767372, 'fraction_numerical': 0.012084592145015106, 'mean_word_length': 3.3384279475982535, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4462432', 'n_tokens_mistral': 865, 'n_tokens_neox': 825, 'n_words': 156}