James Kuszmaul | 9a05bfd | 2019-08-03 17:03:38 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # This script forces generation of all the necessary cache files from emscripten. |
| 3 | export 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. |
| 6 | tools/cpp/emscripten/emcc.sh -o foo.html.tar tools/cpp/emscripten/foo.o -s 'USE_WEBGL2=1' -no-canonical-prefixes |
| 7 | tools/cpp/emscripten/emcc.sh -o foo.html.tar tools/cpp/emscripten/foo.o -s 'USE_WEBGL2=0' -no-canonical-prefixes |
| 8 | for OUTPUT in $@ |
| 9 | do |
| 10 | if [ ! -f ${OUTPUT} ]; then |
| 11 | cp -f tmp/emscripten_cache/asmjs/$(basename ${OUTPUT}) ${OUTPUT} |
| 12 | fi |
| 13 | done |