aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc12
1 files changed, 9 insertions, 3 deletions
diff --git a/emcc b/emcc
index 68f5cc35..fa00bb52 100755
--- a/emcc
+++ b/emcc
@@ -74,7 +74,7 @@ emcc can be influenced by a few environment variables:
EMMAKEN_COMPILER - The compiler to be used, if you don't want the default clang.
'''
-import os, sys, shutil, tempfile, subprocess, shlex
+import os, sys, shutil, tempfile, subprocess, shlex, time
from subprocess import PIPE, STDOUT
from tools import shared
from tools.shared import Compression, execute, suffix, unsuffixed, unsuffixed_basename
@@ -815,7 +815,8 @@ try:
extra_files_to_link = []
- if not LEAVE_INPUTS_RAW and not AUTODEBUG:
+ if not LEAVE_INPUTS_RAW and not AUTODEBUG and \
+ not shared.Settings.BUILD_AS_SHARED_LIB == 2: # shared lib 2 use the library in the parent
# Check if we need to include some libraries that we compile. (We implement libc ourselves in js, but
# compile a malloc implementation and stdlibc++.)
# Note that we assume a single symbol is enough to know if we have/do not have dlmalloc etc. If you
@@ -921,10 +922,15 @@ try:
print >> sys.stderr, 'emcc: saving intermediate processing steps to %s' % shared.EMSCRIPTEN_TEMP_DIR
intermediate_counter = 0
+ intermediate_time = None
def save_intermediate(name=None, suffix='js'):
- global intermediate_counter
+ global intermediate_counter, intermediate_time
shutil.copyfile(final, os.path.join(shared.EMSCRIPTEN_TEMP_DIR, 'emcc-%d%s.%s' % (intermediate_counter, '' if name is None else '-' + name, suffix)))
intermediate_counter += 1
+ now = time.time()
+ if intermediate_time:
+ print >> sys.stderr, 'emcc: step took %.2f seconds' % (now - intermediate_time)
+ intermediate_time = now
if not LEAVE_INPUTS_RAW: save_intermediate('basebc', 'bc')