blob: d8391d8bdc6995325dd8b1a7e9fe9e0ef81d90e2 [file] [log] [blame]
James Kuszmaul9a05bfd2019-08-03 17:03:38 -07001#!/bin/bash
2# This script forces generation of all the necessary cache files from emscripten.
3export EMCC_FORCE_STDLIBS=1
4# Run with WEBGL2 enabled and not, as the compiler will only generate one of the
5# webgl libraries at once.
6tools/cpp/emscripten/emcc.sh -o foo.html.tar tools/cpp/emscripten/foo.o -s 'USE_WEBGL2=1' -no-canonical-prefixes
7tools/cpp/emscripten/emcc.sh -o foo.html.tar tools/cpp/emscripten/foo.o -s 'USE_WEBGL2=0' -no-canonical-prefixes
8for OUTPUT in $@
9do
10 if [ ! -f ${OUTPUT} ]; then
11 cp -f tmp/emscripten_cache/asmjs/$(basename ${OUTPUT}) ${OUTPUT}
12 fi
13done