[SERVER-17785] Scope application of link groups to actual groups Created: 29/Mar/15 Updated: 14/Apr/16 Resolved: 16/Oct/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Andrew Morrow (Inactive) | Assignee: | Andrew Morrow (Inactive) |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Sprint: | Platform 2 04/24/15 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Currently, when libdeps links in static archive mode, the build system wraps the entire list of libraries in --start-group and --end-group since there may be cycles in the dependency graph. This is very expensive, since it means that the linker must rescan libraries many times. However, many of the libraries are not actually part of a cycle, and so do not need to be re-scanned. The application of --start-group and --end-group should be scoped to actual groups. This will require that we topsort the library dependencies and groups, and that we have a way of declaring (or detecting) which libraries form groups. As an additional effect, this will make it easier to identify groups, which we can then aim to eliminate as we work towards achieving |
| Comments |
| Comment by Andrew Morrow (Inactive) [ 16/Oct/15 ] |
|
Yes, and we should be able to do that once the graph is acyclic. We will still need the stable topsort, but I think that is achievable. We will know when it is time to implement that and drop start/end group once there are no more 'incomplete' libdeps tags. |
| Comment by Andy Schwerin [ 16/Oct/15 ] |
|
Sure, we can close it. I would like to get rid of --start-group and --end-group entirely, to improve link time, at some point. |
| Comment by Andrew Morrow (Inactive) [ 16/Oct/15 ] |
|
I'm inclined to close this ticket as wont fix. We went another direction with this via the LIBDEPS_TAGS and incomplete libraries. Andy, do you agree? I'd be surprised if we actually did this work. |
| Comment by Andy Schwerin [ 29/Mar/15 ] |
|
Note, the top sort must be stable to avoid needless relinking. |