forked from emscripten-core/emscripten
-
Notifications
You must be signed in to change notification settings - Fork 0
/
em++
executable file
·21 lines (16 loc) · 614 Bytes
/
em++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/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(os.path.realpath(__file__)), 'emcc.py')] + sys.argv[1:]))