aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-03-05 15:29:33 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-03-05 15:29:33 -0800
commit20f003197bbcfec352e7ef555b37fbe40f356442 (patch)
treef4aa441dfabb92699b7f90cf5eb7214e3767369e
parent570af9b25d3d60fa9c52ab8ad13ad8eafaf82a2e (diff)
run compiler engine in src/
-rwxr-xr-xemscripten.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/emscripten.py b/emscripten.py
index 0b9244c2..2b720293 100755
--- a/emscripten.py
+++ b/emscripten.py
@@ -41,7 +41,8 @@ def process_funcs((i, funcs, meta, settings_file, compiler, forwarded_file, libr
compiler,
engine=compiler_engine,
args=[settings_file, funcs_file, 'funcs', forwarded_file] + libraries,
- stdout=subprocess.PIPE)
+ stdout=subprocess.PIPE,
+ cwd=path_from_root('src'))
tempfiles.try_delete(funcs_file)
return out
@@ -153,7 +154,8 @@ def emscript(infile, settings, outfile, libraries=[], compiler_engine=None,
if out and DEBUG: print >> sys.stderr, ' loading pre from jcache'
if not out:
open(pre_file, 'w').write(pre_input)
- out = jsrun.run_js(compiler, compiler_engine, [settings_file, pre_file, 'pre'] + libraries, stdout=subprocess.PIPE)
+ out = jsrun.run_js(compiler, compiler_engine, [settings_file, pre_file, 'pre'] + libraries, stdout=subprocess.PIPE,
+ cwd=path_from_root('src'))
if jcache:
if DEBUG: print >> sys.stderr, ' saving pre to jcache'
jcache.set(shortkey, keys, out)
@@ -304,7 +306,8 @@ def emscript(infile, settings, outfile, libraries=[], compiler_engine=None,
if DEBUG: t = time.time()
post_file = temp_files.get('.post.ll').name
open(post_file, 'w').write('\n') # no input, just processing of forwarded data
- out = jsrun.run_js(compiler, compiler_engine, [settings_file, post_file, 'post', forwarded_file] + libraries, stdout=subprocess.PIPE)
+ out = jsrun.run_js(compiler, compiler_engine, [settings_file, post_file, 'post', forwarded_file] + libraries, stdout=subprocess.PIPE,
+ cwd=path_from_root('src'))
post, last_forwarded_data = out.split('//FORWARDED_DATA:') # if this fails, perhaps the process failed prior to printing forwarded data?
last_forwarded_json = json.loads(last_forwarded_data)