diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-01-18 21:24:11 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-01-18 21:24:11 -0800 |
commit | 30a94d3f6f7c7aa03065d6e73f9e876ea6934e8e (patch) | |
tree | 99dc3869b6b7b66632d8e1f83049ccfb4072c4db /emcc | |
parent | eb3b69d8f96c8b2f60a3560b94af7ae1bb9346b5 (diff) |
always include dlmalloc if including libcxx, since libcxx uses new internally
Diffstat (limited to 'emcc')
-rwxr-xr-x | emcc | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -482,8 +482,10 @@ try: libcxx_symbols = filter(lambda symbol: symbol not in dlmalloc_symbols, libcxx_symbols) libcxx_symbols = set(libcxx_symbols) - for name, create, fix, library_symbols in [('dlmalloc', create_dlmalloc, fix_dlmalloc, dlmalloc_symbols), - ('libcxx', create_libcxx, fix_libcxx, libcxx_symbols)]: + force = False # If we have libcxx, we must force inclusion of dlmalloc, since libcxx uses new internally. Note: this is kind of hacky + + for name, create, fix, library_symbols in [('libcxx', create_libcxx, fix_libcxx, libcxx_symbols), + ('dlmalloc', create_dlmalloc, fix_dlmalloc, dlmalloc_symbols)]: need = False has = False for input_file in input_files: @@ -493,10 +495,11 @@ try: need = True if library_symbol in symbols.defs: has = True - if need and not has: + if force or (need and not has): # We need to build and link the library in if DEBUG: print >> sys.stderr, 'emcc: including %s' % name extra_files_to_link.append(shared.Cache.get(name, create)) + force = True if fix: fix() |