diff options
-rwxr-xr-x | emcc | 11 | ||||
-rw-r--r-- | tools/shared.py | 9 |
2 files changed, 10 insertions, 10 deletions
@@ -77,7 +77,7 @@ emcc can be influenced by a few environment variables: import os, sys, shutil, tempfile, subprocess, shlex from subprocess import PIPE, STDOUT from tools import shared -from tools.shared import Compression, execute +from tools.shared import Compression, execute, suffix, unsuffixed, unsuffixed_basename # Mapping of emcc opt levels to llvm opt levels. We use llvm opt level 3 in emcc opt # levels 2 and 3 (emcc 3 is unsafe opts, so unsuitable for the only level to get @@ -335,15 +335,6 @@ STATICLIB_SUFFIXES = ('.a',) ASSEMBLY_SUFFIXES = ('.ll',) LIB_PREFIXES = ('', 'lib') -def suffix(name): - return name.split('.')[-1] - -def unsuffixed(name): - return '.'.join(name.split('.')[:-1]) - -def unsuffixed_basename(name): - return os.path.basename(unsuffixed(name)) - seen_names = {} def unsuffixed_uniquename(name): ret = unsuffixed_basename(name) diff --git a/tools/shared.py b/tools/shared.py index f76aa7f2..f431318b 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -959,3 +959,12 @@ def execute(cmd, *args, **kw): print >> sys.stderr, 'Invoking Process failed: <<< ' + cmd + ' >>>' raise +def suffix(name): + return name.split('.')[-1] + +def unsuffixed(name): + return '.'.join(name.split('.')[:-1]) + +def unsuffixed_basename(name): + return os.path.basename(unsuffixed(name)) + |