Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-49119

Expansion of init-no-global-side-effects tag should be different in dynamic builds

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: Build
    • None
    • Fully Compatible
    • Dev Platform 2020-08-10, Dev Platform 2020-08-24, Dev Platform 2020-09-07
    • 0

      The init-no-global-side-effects tag allows the build, in static mode, to not wrap use of the static library in -Wl,--whole-archive ... -Wl,--no-whole-archive or the semantic equivalent on other platforms.

      In dynamic builds we have no need at all of the --whole-archive flag at all. Instead, the flag could be interpreted to mean that the library can be wrapped instead in -Wl,--no-as-needed ... -Wl,--as-needed, or the local equivalent. This would allow libraries that have no global initialization side effects to be automatically pruned from the DT_NEEDED set, even if LIBDEPS in public mode causes the library to be spammed on to the link line of other things.

            Assignee:
            daniel.moody@mongodb.com Daniel Moody
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: