diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-07-03 16:18:29 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-07-03 16:18:29 -0700 |
commit | e6c426b74bfdd16673264e3301dd2535f6fbf448 (patch) | |
tree | f138eb313719cf781eed61b35a87c8002311426d /tools/shared.py | |
parent | 2e570754a50b5ae8bae2bbf3f92c859a3ff13278 (diff) |
force-include .a contents when it is the only input aside from linked libraries
Diffstat (limited to 'tools/shared.py')
-rw-r--r-- | tools/shared.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/shared.py b/tools/shared.py index c5f53474..d35924c6 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -867,7 +867,7 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)''' % { 'winfix': '' if not WINDOWS e return generated_libs @staticmethod - def link(files, target): + def link(files, target, force_archive_contents=False): actual_files = [] unresolved_symbols = set(['main']) # tracking unresolveds is necessary for .a linking, see below. (and main is always a necessary symbol) resolved_symbols = set() @@ -918,7 +918,7 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)''' % { 'winfix': '' if not WINDOWS e # Link in the .o if it provides symbols, *or* this is a singleton archive (which is apparently an exception in gcc ld) #print >> sys.stderr, 'need', content, '?', unresolved_symbols, 'and we can supply', new_symbols.defs #print >> sys.stderr, content, 'DEF', new_symbols.defs, '\n' - if new_symbols.defs.intersection(unresolved_symbols) or len(files) == 1: + if new_symbols.defs.intersection(unresolved_symbols) or len(files) == 1 or force_archive_contents: if Building.is_bitcode(content): #print >> sys.stderr, ' adding object', content, '\n' resolved_symbols = resolved_symbols.union(new_symbols.defs) |