diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-02-25 14:21:22 -0500 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-02-25 14:21:22 -0500 |
commit | e26971d4efce418fa303499c11eb6b216f54a60f (patch) | |
tree | cdb9af5710c31799d8249b8a5f01b66953598314 /emcc | |
parent | dce4bc033cf7ae8ce4630991a7661446ecf5434e (diff) |
EMCC_FORCE_STDLIBS option
Diffstat (limited to 'emcc')
-rwxr-xr-x | emcc | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -1054,8 +1054,10 @@ try: libcxxabi_symbols = filter(lambda symbol: symbol not in libc_symbols, libcxxabi_symbols) libcxxabi_symbols = set(libcxxabi_symbols) - force = False # If we have libcxx, we must force inclusion of libc, since libcxx uses new internally. Note: this is kind of hacky - + # If we have libcxx, we must force inclusion of libc, since libcxx uses new internally. Note: this is kind of hacky + # Settings this in the environment will avoid checking dependencies and make building big projects a little faster + force = os.environ.get('EMCC_FORCE_STDLIBS') + has = need = None 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)]: @@ -1077,7 +1079,7 @@ try: # We need to build and link the library in if DEBUG: print >> sys.stderr, 'emcc: including %s' % name libfile = shared.Cache.get(name, create) - if len(has) > 0: + if has and len(has) > 0: # remove the symbols we do not need fixed = in_temp(uniquename(libfile)) + '.bc' shutil.copyfile(libfile, fixed) @@ -1087,7 +1089,7 @@ try: libfile = fixed extra_files_to_link.append(libfile) force = True - if fix: + if fix and need: fix(need) # First, combine the bitcode files if there are several. We must also link if we have a singleton .a |