aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-01-25 09:55:58 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-01-25 09:55:58 -0800
commit72133a594261ec3a4c4231ded730a75029d9fddf (patch)
tree7be37361f2456662fcf5336707f7644ab0d97df4 /emcc
parente3c6c8170a423d69d689a60570f3167d0162cef3 (diff)
autodebugger support in emcc
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc8
1 files changed, 7 insertions, 1 deletions
diff --git a/emcc b/emcc
index 03040f7e..01966b1c 100755
--- a/emcc
+++ b/emcc
@@ -530,7 +530,7 @@ try:
if DEBUG: print >> sys.stderr, 'emcc: LLVM dead globals elimination'
shared.Building.llvm_opt(in_temp(target_basename + '.bc'), ['-internalize', '-globaldce'])
- # Emscripten
+ # Prepare .ll for Emscripten
try:
if shared.Settings.RELOOP:
print >> sys.stderr, 'emcc: warning: The relooper optimization can be very slow.'
@@ -555,6 +555,12 @@ try:
final = input_files[0]
if DEBUG: save_intermediate('ll', 'll')
+ if os.environ.get('EMCC_AUTODEBUG'):
+ Popen(['python', shared.AUTODEBUGGER, final, final + '.ad.ll']).communicate()[0]
+ final += '.ad.ll'
+ if DEBUG: save_intermediate('autodebug', 'll')
+
+ # Emscripten
if DEBUG: print >> sys.stderr, 'emcc: LLVM => JS'
final = shared.Building.emscripten(final, append_ext=False)
if DEBUG: save_intermediate('original')