https://github.com/kripken/emscripten
Revision c6e63f022c4983d365a0d38596370fd75a9d9294 authored by Alon Zakai (kripken) on 02 May 2017, 22:59:48 UTC, committed by Alon Zakai (kripken) on 02 May 2017, 22:59:48 UTC
1 parent 13d3660
Raw File
Tip revision: c6e63f022c4983d365a0d38596370fd75a9d9294 authored by Alon Zakai (kripken) on 02 May 2017, 22:59:48 UTC
don't pass the target buffer into FS.mmap, as it is always HEAPU8, and it may change if malloc reallocates
Tip revision: c6e63f0
em++
#!/usr/bin/env python

# This script should work in python 2 *or* 3. It loads emcc.py, which needs python 2.
# It also tells emcc.py that we want C++ and not C by default

from tools.toolchain_profiler import ToolchainProfiler

import sys

sys.argv += ['--emscripten-cxx']

if sys.version_info.major == 2:
  if __name__ == '__main__':
    ToolchainProfiler.record_process_start()
    import emcc
    emcc.run()
    sys.exit(0)
else:
  import os, subprocess
  if __name__ == '__main__':
    sys.exit(subprocess.call(['python2', os.path.join(os.path.dirname(__file__), 'emcc.py')] + sys.argv[1:]))
back to top