[SERVER-54928] Investigate injection of libdeps tags via ARFLAGS Created: 03/Mar/21 Updated: 29/Oct/23 Resolved: 30/Mar/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Andrew Morrow (Inactive) | Assignee: | Daniel Moody |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Dev Platform 2021-03-22, Dev Platform 2021-04-05 |
| Participants: |
| Description |
|
In |
| Comments |
| Comment by Githook User [ 29/Mar/21 ] |
|
Author: {'name': 'Daniel Moody', 'email': 'daniel.moody@mongodb.com', 'username': 'dmoody256'}Message: |
| Comment by Daniel Moody [ 22/Mar/21 ] |
|
Code Review: https://mongodbcr.appspot.com/774100017/ |
| Comment by Daniel Moody [ 16/Mar/21 ] |
|
after some discussion on scons discord, bdbaddog suggested storing pre/post flag information on the target node in an emitter: https://discord.com/channels/571796279483564041/612459756246007829/821453516672335902 This will remove the need to the ARFLAGS subst. |
| Comment by Daniel Moody [ 09/Mar/21 ] |
|
Okay I did some digging and this is how its working: The ARFLAGS are assigned _LIBDEPS_TAGS so that all static libraries we build will run the expansions. AR is used for creating the .a libraries which are linked with the linker. One of the expansions that we assign globally is the no_global_init expansion. This needs to expand for every static library, modifying that static library node environment, to set the pre and post flags for that node environment if it has the no_global_init tag. Later in the build when we go to get the libdeps for linking with the linker, every libdep is converted to a node, and that node env checked if it has the pre and postfix flags that were set in the original expansion per static library node, and then added to the link line if necessary.
|