diff options
author | Nick Bray <ncbray@chromium.org> | 2013-08-07 12:39:33 -0700 |
---|---|---|
committer | Nick Bray <ncbray@chromium.org> | 2013-08-07 12:46:41 -0700 |
commit | 8999e0e20212d736b539f15debad25a69dda2f98 (patch) | |
tree | 59b46aa56ed834f8806684c09029d931f39e8c00 /tools/shared.py | |
parent | 1b7122c6aaa19cb6e2a62598dca8e0fd9e3cc7a7 (diff) |
Ensure the linker pulls in static libraries containing exported functions.
Previously, an exported function contained in a library would not be found by
the linker if the library did not contain symbols transitively reachable from
main.
Diffstat (limited to 'tools/shared.py')
-rw-r--r-- | tools/shared.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/shared.py b/tools/shared.py index c0df227d..b80d9389 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -876,7 +876,10 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)''' % { 'winfix': '' if not WINDOWS e @staticmethod 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) + # Tracking unresolveds is necessary for .a linking, see below. + # Specify all possible entry points to seed the linking process. + # For a simple application, this would just be "main". + unresolved_symbols = set([func[1:] for func in Settings.EXPORTED_FUNCTIONS]) resolved_symbols = set() temp_dirs = [] files = map(os.path.abspath, files) |