aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlan Kligman <alan.kligman@gmail.com>2012-12-01 18:31:36 -0500
committerAlan Kligman <alan.kligman@gmail.com>2012-12-19 18:06:48 -0500
commit315f13e5a1b35e23241da080f0df16e80ece88ae (patch)
treeed8d07eb649011f9b10b6f3a749073c37b033aca /emcc
parent1c796635aa711764d18a47577d5e94ead309506c (diff)
Updated scripts to call python2 directly rather than relying on python symlink pointing to the right place. See PEP394 for details on why this should be OK.
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc14
1 files changed, 7 insertions, 7 deletions
diff --git a/emcc b/emcc
index 7a826b46..71faf08d 100755
--- a/emcc
+++ b/emcc
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
'''
emcc - compiler helper script
@@ -925,9 +925,9 @@ try:
# dlmalloc
def create_dlmalloc():
if DEBUG: print >> sys.stderr, 'emcc: building dlmalloc for cache'
- execute(shared.ENV_PREFIX + ['python', shared.EMCC, shared.path_from_root('system', 'lib', 'dlmalloc.c'), '-g', '-o', in_temp('dlmalloc.o')], stdout=stdout, stderr=stderr)
+ execute(shared.ENV_PREFIX + ['python2', shared.EMCC, shared.path_from_root('system', 'lib', 'dlmalloc.c'), '-g', '-o', in_temp('dlmalloc.o')], stdout=stdout, stderr=stderr)
# we include the libc++ new stuff here, so that the common case of using just new/delete is quick to link
- execute(shared.ENV_PREFIX + ['python', shared.EMXX, shared.path_from_root('system', 'lib', 'libcxx', 'new.cpp'), '-g', '-o', in_temp('new.o')], stdout=stdout, stderr=stderr)
+ execute(shared.ENV_PREFIX + ['python2', shared.EMXX, shared.path_from_root('system', 'lib', 'libcxx', 'new.cpp'), '-g', '-o', in_temp('new.o')], stdout=stdout, stderr=stderr)
shared.Building.link([in_temp('dlmalloc.o'), in_temp('new.o')], in_temp('dlmalloc_full.o'))
return in_temp('dlmalloc_full.o')
def fix_dlmalloc():
@@ -950,7 +950,7 @@ try:
os = []
for src in ['algorithm.cpp', 'condition_variable.cpp', 'future.cpp', 'iostream.cpp', 'memory.cpp', 'random.cpp', 'stdexcept.cpp', 'system_error.cpp', 'utility.cpp', 'bind.cpp', 'debug.cpp', 'hash.cpp', 'mutex.cpp', 'string.cpp', 'thread.cpp', 'valarray.cpp', 'chrono.cpp', 'exception.cpp', 'ios.cpp', 'locale.cpp', 'regex.cpp', 'strstream.cpp', 'typeinfo.cpp']:
o = in_temp(src + '.o')
- execute(shared.ENV_PREFIX + ['python', shared.EMXX, shared.path_from_root('system', 'lib', 'libcxx', src), '-o', o], stdout=stdout, stderr=stderr)
+ execute(shared.ENV_PREFIX + ['python2', shared.EMXX, shared.path_from_root('system', 'lib', 'libcxx', src), '-o', o], stdout=stdout, stderr=stderr)
os.append(o)
shared.Building.link(os, in_temp('libcxx.bc'))
return in_temp('libcxx.bc')
@@ -969,7 +969,7 @@ try:
os = []
for src in ['private_typeinfo.cpp']:
o = in_temp(src + '.o')
- execute(shared.ENV_PREFIX + ['python', shared.EMXX, shared.path_from_root('system', 'lib', 'libcxxabi', 'src', src), '-o', o], stdout=stdout, stderr=stderr)
+ execute(shared.ENV_PREFIX + ['python2', shared.EMXX, shared.path_from_root('system', 'lib', 'libcxxabi', 'src', src), '-o', o], stdout=stdout, stderr=stderr)
os.append(o)
shared.Building.link(os, in_temp('libcxxabi.bc'))
return in_temp('libcxxabi.bc')
@@ -1075,7 +1075,7 @@ try:
if AUTODEBUG:
if DEBUG: print >> sys.stderr, 'emcc: autodebug'
- execute(shared.ENV_PREFIX + ['python', shared.AUTODEBUGGER, final, final + '.ad.ll'])
+ execute(shared.ENV_PREFIX + ['python2', shared.AUTODEBUGGER, final, final + '.ad.ll'])
final += '.ad.ll'
if DEBUG: save_intermediate('autodebug', 'll')
@@ -1098,7 +1098,7 @@ try:
file_args += embed_files
if Compression.on:
file_args += ['--compress', Compression.encoder, Compression.decoder, Compression.js_name]
- code = execute(shared.ENV_PREFIX + ['python', shared.FILE_PACKAGER, unsuffixed(target) + '.data'] + file_args, stdout=PIPE)[0]
+ code = execute(shared.ENV_PREFIX + ['python2', shared.FILE_PACKAGER, unsuffixed(target) + '.data'] + file_args, stdout=PIPE)[0]
src = open(final).read().replace('// {{PRE_RUN_ADDITIONS}}', '// {{PRE_RUN_ADDITIONS}}\n' + code)
final += '.files.js'
open(final, 'w').write(src)