diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-05-23 11:53:46 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-05-23 11:53:46 -0700 |
commit | df4afcdf000553b76574594465fa4013deff7aad (patch) | |
tree | 4e04fb52db3f50efabc9740ccf5e6e196fc0e519 /emcc | |
parent | ba02f957f79391d205348695c932e4f99e5adc32 (diff) | |
parent | ca5246e4131edb367f204538835801ee0eab79dc (diff) |
Merge pull request #2381 from rsturgell/whitelist_link_flags
Whitelist supported link flags
Diffstat (limited to 'emcc')
-rwxr-xr-x | emcc | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -64,6 +64,7 @@ DYNAMICLIB_ENDINGS = ('.dylib', '.so', '.dll') STATICLIB_ENDINGS = ('.a',) ASSEMBLY_ENDINGS = ('.ll',) HEADER_ENDINGS = ('.h', '.hxx', '.hpp', '.hh', '.H', '.HXX', '.HPP', '.HH') +SUPPORTED_LINKER_FLAGS = ('--start-group', '-(', '--end-group', '-)') LIB_PREFIXES = ('', 'lib') @@ -1177,7 +1178,12 @@ try: # (4, a), (4.25, b), (4.5, c), (4.75, d) link_flags_to_add = arg.split(',')[1:] for flag_index, flag in enumerate(link_flags_to_add): - link_flags.append((i + float(flag_index) / len(link_flags_to_add), flag)) + # Only keep flags that shared.Building.link knows how to deal with. + # We currently can't handle flags with options (like + # -Wl,-rpath,/bin:/lib, where /bin:/lib is an option for the -rpath + # flag). + if flag in SUPPORTED_LINKER_FLAGS: + link_flags.append((i + float(flag_index) / len(link_flags_to_add), flag)) newargs[i] = '' original_input_files = input_files[:] |