aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-10-29 17:25:42 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-10-29 17:25:42 -0700
commit83faf3466056ed70bcf62cd9a63cb23bc4fa40cf (patch)
tree8e3aacb340023ed47f0fe441fbe5dda5b1e60f40 /emcc
parent3e34ab9ba69db752309e88562d9e0df778e43537 (diff)
configure debugging tools
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc10
1 files changed, 10 insertions, 0 deletions
diff --git a/emcc b/emcc
index b3ba5be3..3eda9f4f 100755
--- a/emcc
+++ b/emcc
@@ -394,7 +394,17 @@ if CONFIGURE_CONFIG or CMAKE_CONFIG:
cmd = [compiler] + list(filter_emscripten_options(sys.argv[1:]))
if use_clang: cmd += shared.EMSDK_OPTS + ['-DEMSCRIPTEN']
+
if DEBUG: print >> sys.stderr, 'emcc, just configuring: ', ' '.join(cmd)
+ if 0: # XXX use this to debug non-clang configure; ./configure's generally hide our normal output including stderr so we write to a file
+ tempout = '/tmp/emscripten_temp/out'
+ if not os.path.exists(tempout):
+ open(tempout, 'w').write('//\n')
+ open(tempout, 'a').write('emcc, just configuring: ' + ' '.join(cmd) + '\n\n')
+ for i in range(len(sys.argv)):
+ if sys.argv[i].endswith('.c'):
+ open(tempout, 'a').write('============= ' + sys.argv[i] + '\n' + open(sys.argv[i]).read() + '\n=============\n\n')
+
if use_clang:
exit(subprocess.call(cmd))
else: