aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorVladimir Vukicevic <vladimirv@dugeo.com>2013-02-26 19:39:14 -0500
committerVladimir Vukicevic <vladimirv@dugeo.com>2013-02-26 19:42:31 -0500
commitd08b1ad1ec7500fe600a075c69ec72350ec89152 (patch)
tree9867d4c1ff2ebf59d3a5f46d8fa93da89cd04315 /emcc
parentbafdc889fcfcab5715e8dae5d26c3d5ff3160498 (diff)
add cache debugging
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc8
1 files changed, 7 insertions, 1 deletions
diff --git a/emcc b/emcc
index 03b18242..a6f0c12d 100755
--- a/emcc
+++ b/emcc
@@ -91,7 +91,10 @@ LLVM_OPT_LEVEL = {
3: 3,
}
-DEBUG = int(os.environ.get('EMCC_DEBUG') or 0)
+DEBUG = os.environ.get('EMCC_DEBUG')
+if DEBUG == "0":
+ DEBUG = None
+
TEMP_DIR = os.environ.get('EMCC_TEMP_DIR')
LEAVE_INPUTS_RAW = os.environ.get('EMCC_LEAVE_INPUTS_RAW') # Do not compile .ll files into .bc, just compile them with emscripten directly
# Not recommended, this is mainly for the test runner, or if you have some other
@@ -1120,7 +1123,10 @@ try:
(not LEAVE_INPUTS_RAW and not (suffix(temp_files[0]) in BITCODE_SUFFIXES or suffix(temp_files[0]) in DYNAMICLIB_SUFFIXES) and shared.Building.is_ar(temp_files[0])):
linker_inputs = temp_files + extra_files_to_link
if DEBUG: print >> sys.stderr, 'emcc: linking: ', linker_inputs
+ t0 = time.time()
shared.Building.link(linker_inputs, in_temp(target_basename + '.bc'))
+ t1 = time.time()
+ if DEBUG: print >> sys.stderr, 'emcc: linking took %.2f seconds' % (t1 - t0)
final = in_temp(target_basename + '.bc')
else:
if not LEAVE_INPUTS_RAW: