aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-02-25 11:49:16 -0500
committerAlon Zakai <alonzakai@gmail.com>2013-02-25 11:49:16 -0500
commite24cfb71dfd9bd4ecd3e682971662c91e17db400 (patch)
tree5df542267a6c6b3b68cef8a95b3938970530b099 /emcc
parent28b48f7018b72a80b202ad4c76a1e954d2f9174e (diff)
only do symbol checks for libcxx etc. if not forcing them anyhow
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc27
1 files changed, 14 insertions, 13 deletions
diff --git a/emcc b/emcc
index 64c65d47..39c4282b 100755
--- a/emcc
+++ b/emcc
@@ -1059,19 +1059,20 @@ try:
for name, create, fix, library_symbols in [('libcxx', create_libcxx, fix_libcxx, libcxx_symbols),
('libcxxabi', create_libcxxabi, fix_libcxxabi, libcxxabi_symbols),
('libc', create_libc, fix_libc, libc_symbols)]:
- need = set()
- has = set()
- for temp_file in temp_files:
- symbols = shared.Building.llvm_nm(temp_file)
- for library_symbol in library_symbols:
- if library_symbol in symbols.undefs:
- need.add(library_symbol)
- if library_symbol in symbols.defs:
- has.add(library_symbol)
- for haz in has: # remove symbols that are supplied by another of the inputs
- if haz in need:
- need.remove(haz)
- if DEBUG: print >> sys.stderr, 'emcc: considering including %s: we need %s and have %s' % (name, str(need), str(has))
+ if not force:
+ need = set()
+ has = set()
+ for temp_file in temp_files:
+ symbols = shared.Building.llvm_nm(temp_file)
+ for library_symbol in library_symbols:
+ if library_symbol in symbols.undefs:
+ need.add(library_symbol)
+ if library_symbol in symbols.defs:
+ has.add(library_symbol)
+ for haz in has: # remove symbols that are supplied by another of the inputs
+ if haz in need:
+ need.remove(haz)
+ if DEBUG: print >> sys.stderr, 'emcc: considering including %s: we need %s and have %s' % (name, str(need), str(has))
if force or len(need) > 0:
# We need to build and link the library in
if DEBUG: print >> sys.stderr, 'emcc: including %s' % name