diff options
-rwxr-xr-x | emcc | 6 | ||||
-rw-r--r-- | tools/shared.py | 8 |
2 files changed, 7 insertions, 7 deletions
@@ -483,10 +483,10 @@ try: has = False for input_file in input_files: symbols = shared.Building.llvm_nm(in_temp(unsuffixed_basename(input_file) + '.o')) - for malloc_def in library_symbols: - if malloc_def in symbols.undefs: + for library_symbol in library_symbols: + if library_symbol in symbols.undefs: need = True - if malloc_def in symbols.defs: + if library_symbol in symbols.defs: has = True if need and not has: # We need to build and link the library in diff --git a/tools/shared.py b/tools/shared.py index 0f117fad..4fb02987 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -487,15 +487,15 @@ class Building: # LLVM binary ==> list of symbols output = Popen([LLVM_NM, filename], stdout=stdout, stderr=stderr).communicate()[0] class ret: - defs = [] - undefs = [] + defs = {} + undefs = {} for line in output.split('\n'): if len(line) == 0: continue status, symbol = filter(lambda seg: len(seg) > 0, line.split(' ')) if status == 'U': - ret.undefs.append(symbol) + ret.undefs[symbol] = True else: - ret.defs.append(symbol) + ret.defs[symbol] = True return ret @staticmethod |